Error Handling & Debugging
Last updated
Last updated
The Haiku Enterprise API provides detailed error responses to help developers quickly identify and resolve issues. All API errors follow standard HTTP response codes, and additional details are provided in the response body.
If an API request fails, follow these steps:
Check the Error Message: Read the message
field in the JSON response for specific details.
Verify Request Formatting: Ensure all request headers are included and confirm the request matches the expected structure.
Confirm API Key Validity: Xheck if the API key is valid and not expired. Run a simple test with GET /tokenList to see if authentication works.
Handle Rate Limits Properly: If you get a 429 error, check the rate limit headers.
Check Haiku API Status: Look at the status page for known outages or maintenance.
Contact Support: If the issue persists, reach out to support with:
The error response JSON
The request payload
The timestamp of the request
Any relevant logs or transaction IDs
400
Bad Request
The request is malformed or contains invalid parameters
401
Unauthorized
Missing or invalid API key
429
Too Many Requests
The rate limit has been exceeded
500
Internal Server Error
Unexpected issue on the API side
When an error occurs, the API responds with a structured JSON error message.
Example: 400 Bad Request (Invalid Parameters)
Example: 401 Unauthorized (Missing API Key)
Verify the API key is included and valid.
Example: 429 Too Many Requests (Rate Limit Exceeded)
Reduce request frequency and implement rate limit handling.
Example: 500 Internal Server Error
If the error persists, contact [email protected].