Error Response Format
When an error occurs, the API returns a consistent error response:HTTP Status Codes
Common Error Codes
Authentication Errors
Validation Errors
Resource Errors
Error Handling Best Practices
1
Check Status Code First
Use the HTTP status code to determine the general category of error.
2
Parse Error Response
Extract the
error.code and error.message for specific handling.3
Log Details
Store the full error response for debugging purposes.
4
Display User-Friendly Messages
Translate error codes into messages appropriate for your users.