Error Handling
The API uses standard HTTP status codes and returns error messages in a consistent format.
Error Response Format
All errors follow this structure:
{
"error": "Error Type",
"message": "Human-readable error message",
"details": {}
}HTTP Status Codes
200
OK
Request succeeded
400
Bad Request
Invalid request parameters
404
Not Found
Resource not found
429
Too Many Requests
Rate limit exceeded
500
Internal Server Error
Server error
503
Service Unavailable
Service temporarily unavailable
Error Types
400 Bad Request
Invalid request parameters or validation errors.
Example:
Common Causes:
Invalid date format
Invalid parameter values
Missing required parameters
Parameter out of range
404 Not Found
Resource not found.
Example:
Common Causes:
Transaction signature doesn't exist
Invalid endpoint
Resource was deleted
429 Too Many Requests
Rate limit exceeded.
Example:
Solution: Implement exponential backoff and respect rate limit headers.
500 Internal Server Error
Server error.
Example:
Solution: Retry the request. If the error persists, contact support.
503 Service Unavailable
Service temporarily unavailable.
Example:
Solution: Retry after a delay. Check service status.
Error Handling Examples
JavaScript/TypeScript
Python
Retry Logic
Implement retry logic for transient errors (500, 503, 429):
Last updated