Error Handling Guide
When interacting with Exirom’s APIs, you will encounter standard HTTP status codes in responses. These codes indicate whether a request succeeded or if an error occurred. Below are some common HTTP response codes and what they mean, along with tips on how to resolve or debug the issue:
Error Handling
Exirom APIs return standard HTTP status codes. Handle these responses in your integration to ensure smooth error recovery and debugging.
| HTTP Status Code | Meaning | How to Handle / Debug |
|---|---|---|
| 200 OK | Request succeeded; response contains the transaction details. | No action needed, process the successful response. |
| 400 Bad Request | Invalid or missing parameters in the request. | Check payload, required fields, and data formats. Fix and resend the request. |
| 401 Unauthorized | Missing or invalid authentication credentials (e.g., token). | Add or refresh your API key/token. Ensure correct authentication headers. |
| 403 Forbidden | Authenticated, but no permission to access the resource. | Verify account permissions or use credentials with proper access rights. |
| 404 Not Found | Resource or endpoint not found (wrong URL or ID). | Double-check endpoint path and IDs; ensure resource exists in the correct environment. |
| 500 Internal Server Error | Server-side error while processing the request. | Retry after delay. If persistent, check Exirom status or contact support. |
Best Practices
- Always log error responses with status code, message, and trace ID for debugging.
- Implement retries for 5xx errors with exponential backoff.
- Validate all required parameters before sending requests to avoid 400 errors.
- Monitor transaction statuses until a final state (SUCCEED, FAILED, REFUNDED, CHARGED_BACK, CANCELLED) is reached.
Updated 8 days ago
