Error Response Format
All error responses follow this structure:Error Fields
HTTP Status Codes
2xx - Success
4xx - Client Errors
5xx - Server Errors
Error Codes
Authentication Errors
Validation Errors
Resource Errors
Rate Limit Errors
Payment Errors
Wallet Errors
Error Examples
Validation Error (422)
Rate Limit Error (429)
Authentication Error (401)
Not Found Error (404)
Handling Errors by Type
Validation Errors
Rate Limit Errors
Authentication Errors
Retry Strategy
Recommended Retry Logic
Exponential Backoff
Idempotent Retries
For state-changing operations, use idempotency keys:Request ID Tracking
Every error response includes arequestId. Use this when contacting support:
Common Error Scenarios
400 Bad Request - Invalid JSON
400 Bad Request - Invalid JSON
Cause: Malformed JSON in request body.Solution: Validate JSON syntax before sending.
403 Forbidden - Insufficient scope
403 Forbidden - Insufficient scope
Cause: API key lacks required permissions.Solution: Generate key with appropriate scopes.
404 Not Found - Wrong endpoint
404 Not Found - Wrong endpoint
Cause: Incorrect URL path.Solution: Verify endpoint path in documentation.
409 Conflict - Duplicate resource
409 Conflict - Duplicate resource
Cause: Resource already exists.Solution: Use unique identifiers or update existing.
429 Too Many Requests
429 Too Many Requests
Cause: Rate limit exceeded.Solution: Implement exponential backoff or upgrade plan.
Monitoring Errors
Dashboard
Monitor API errors in the XentFi Dashboard:- Error rate by endpoint
- Top error codes
- Recent failures
- Request ID lookup
Webhooks
Configure error alerting via webhooks:Support
When contacting support, always include:- The
requestIdfrom the error response - Timestamp of the error
- Request details (method, endpoint, body)
- Response headers
Related Resources
- Authentication Guide - Fix authentication errors
- Rate Limits - Understand rate limiting
- Idempotency - Safe request retries

