Standard error response structure
All API errors follow this structure for consistent error handling.
const error: ErrorResponse = { message: 'Invalid API key provided', code: 'INVALID_API_KEY', status: 401}; Copy
const error: ErrorResponse = { message: 'Invalid API key provided', code: 'INVALID_API_KEY', status: 401};
Human-readable error message
Error code for programmatic handling
HTTP status code
Standard error response structure
All API errors follow this structure for consistent error handling.
Example