Skip to main content
In this guide, we will talk about what happens when something goes wrong while you work with the API. Let’s look at some status codes and error types you might encounter. You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong and do some rudimentary debugging.

Error Codes

Here is a list of the different categories of status codes returned by the Nightly API. Use these to understand if a request was successful.

Error Types

Any HTTP status codes greater than 399 will have an error body returned. The error body has the following shape:
No other API responses will have a top-level property called error, so you can also look for the presence of this property to determine if an error has occurred.
Our libraries handle checking for errors automatically.