Learn how to handle errors effectively when interacting with the API
2xx
status code, while client errors return 4xx codes, and server errors return 5xx
codes. For instance, a 200 OK
indicates a successful response, 400 Bad Request
points to an issue with the input data, and 500 Internal Server Error
signals a problem on the server side.
In the event of an error, the API responds with a JSON structure that provides more detailed information. A typical error response might look like this:
Name | Type | Description |
---|---|---|
status | number | HTTP status code generated by the origin server for this occurrence of the error |
code | string | An API specific code representing the type of error |
title | string | A short, human-readable summary of the error type |
detail | string or object | A best effort human readable explanation specific to this occurrence of the error |