Google Tag Manager

Forum Discussion

ashleyatbraze's avatar
ashleyatbraze
Braze Employee
3 years ago

FAQ: 502/503 error

Here's another common question our Support team receives:  I'm getting a 502/503 error in an API call. What does that mean?
  • ashleyatbraze's avatar
    3 years ago

    Issue

    You might see 502 and 503 errors as a response to your API requests from time to time. The below explains why we see these errors occur.

    Cause

    50x errors typically mean a Braze server error. It can mean one of many things - the server you're trying to access is unable to execute the request, the server is undergoing maintenance making it unable to execute the request, or the server is experiencing high levels of traffic. Another, less likely, reason to receive a 50x error is that the data sent in the request cannot be parsed by the receiving server, leading to a generic error. This is usually a temporary error, and thus, the typical course of action is to retry your request at a later date in the hopes of getting a different response. 

    The most common errors are 502 and 503, with 503 being the most common. A 503 error means that the request made it all the way to the destination server but we cannot complete the request. A 502 error is a failure before it even makes it to the destination server. Both indicate a transient error that should be addressed firstly with exponential backoff.

    Resolution

    503 errors are fairly common - it's suggested that you try the API calls again using retry logic with exponential backoff.

    If the percentage for 503 errors exceeds 30% - then we have an issue. If it's lower than that, it can be expected to see.