Skip to main content
Hany uses standard HTTP status codes to indicate whether a request succeeded or failed. Any response with a 4xx or 5xx status code includes a JSON body that gives you a machine-readable error code and a human-readable message — so your integration can respond intelligently without parsing free-form text.

Error Response Format

Every error response follows this consistent shape:
string
Always "error" for failed requests.
string
A stable, snake_case identifier for the error type. Use this field in your application logic — the message field is for humans and may change.
string
A plain-English description of what went wrong, suitable for logging or displaying to internal users.

HTTP Status Codes

Common Error Codes

Handling Errors

Check the HTTP status code first, then inspect error.code to take the appropriate action in your integration:
When retrying after 429 Too Many Requests or 500 Internal Server Error responses, use exponential backoff — wait 1 second before the first retry, 2 seconds before the second, 4 seconds before the third, and so on. This avoids hammering the API while it recovers and reduces the chance of triggering the rate limit again.