504 - Gateway Timeout
A server handling the request didn't hear back from an upstream service in time. That doesn't establish whether the upstream service completed the operation.
What to check
- Check the response for an error code and request ID so you can trace the failed call if it keeps happening.
- Check whether any write took effect before repeating it. For a resumable file upload, check the session status and use exponential backoff when retrying.