Error object
Every error response has this shape:The
data field may not be present on all error responses. Always check for it before accessing nested fields.HTTP status codes
Handling errors
1
Check the status code
Use the HTTP status code to determine the category of error. 4xx means something is wrong with your request. 5xx means something went wrong on our side.
2
Read the message
The
message field tells you what went wrong. The data.message field, when present, gives you specific guidance on how to fix it.3
Save the error code
If the response includes
data.code, save it. Support can use this to look up exactly what happened.