Error Handling
Error Response Format
All ETERA APIs return errors in a consistent JSON format:
HTTP Status Codes
4xx Client Errors
5xx Server Errors
For 5xx errors, always implement retry logic with exponential backoff. These are typically transient issues.
Error Codes
Common error codes returned in the error.code field:
Retry Strategy
For 429 and 5xx errors, implement exponential backoff:
Implementation
For 429 responses, check the Retry-After header if present — it indicates exactly how long to wait before retrying.
Common Scenarios
Authentication errors (401)
Your token has expired or is invalid. Re-authenticate using your preferred method:
See Authentication for details on token refresh.
Validation errors (400/422)
Check the error.details array for field-level validation messages:
Rate limiting (429)
You’ve exceeded the rate limit. Check these headers:
Booking conflicts (409)
The requested time slot or resource is no longer available. Fetch updated availability and let the user choose an alternative.
