Response Codes
Each API request to Manifold will respond with an appropriate HTTP status code, helping you understand the outcome of your requests. Correctly handling each response type will ensure seamless integration with Manifold’s data.
Status Code Overview
Successful Responses (2XX)
- 200 OK: The request was successfully processed, and the requested data is included in the response.
Client Errors (4XX)
- 400 Bad Request: There was an issue with the request. This often occurs due to malformed parameters or incorrect data format.
- 401 Unauthorized: Your API key is missing or invalid. Ensure you have included the correct
X-API-KEY
in your request headers. - 403 Forbidden: You do not have the necessary permissions to access this resource.
- 404 Not Found: The specified endpoint or resource ID does not exist.
- 405 Method Not Allowed: The API only supports
GET
requests. - 429 Too Many Requests: You’ve reached the rate limit. Retry after a delay, implementing exponential backoff if necessary.
Server Errors (5XX)
- 500 Internal Server Error: The server encountered an unexpected issue. This is likely temporary; retrying the request after a short delay is recommended.
- 503 Service Unavailable: The server is temporarily unavailable. Retry after a delay.
Error Handling Tips
- Check Parameters: If you receive a 400 error, verify that all required parameters are included and correctly formatted.
- Authenticate Properly: Ensure that the
X-API-KEY
is valid and included in each request to avoid 401 errors. - Rate Limiting: If you receive a 429 error, reduce your request frequency. Implement exponential backoff to handle temporary limitations gracefully.
Example Error Response
If an error occurs, Manifold will provide an error message in the response body:
{
"status": 429,
"message": "Rate limited"
}
Use these messages for debugging purposes but avoid hardcoding against them, as they may change without version increments.
Best Practices for Error Handling
- Retry with Exponential Backoff: When encountering a 429 or 503 status code, implement a delay before retrying, increasing the delay with each subsequent attempt.
- Log Errors for Diagnostics: Track errors for ongoing diagnostics and troubleshooting.
- Display User-Friendly Messages: Show user-friendly messages in your application based on the status code to improve the user experience.
Updated 7 days ago
Did this page help you?