Error Handling
The FYATU API uses conventional HTTP response codes and returns detailed error messages with machine-readable error codes to help you handle errors programmatically.Response Format
All API responses follow a consistent format:HTTP Status Codes
Error Codes
Each error response includes a machine-readablecode field:
Common Error Scenarios
Authentication Errors (401)
Missing Token
Authorization: Bearer {token} header in your request.
Expired Token
POST /v3/auth/refresh or request a new one via POST /v3/auth/token.
Insufficient Scope
Validation Errors (400)
details array for specific field requirements and fix the request payload.
Insufficient Balance (402)
Resource Not Found (404)
Duplicate Reference (409)
externalReference for each new operation.
Rate Limiting (429)
Error Handling Best Practices
1. Always Check the Response
2. Handle Specific Error Codes
3. Implement Retry with Backoff
4. Log Errors for Debugging
Idempotency
For operations that create resources, use theexternalReference field to prevent duplicates:

