Error Handling
Overview
The FastMint and Burn API uses standard HTTP status codes and consistent JSON error responses to indicate the success or failure of requests.
Response Format
Success Response
{
"success": true,
"data": {
// Response data
}
}Error Response
{
"success": false,
"message": "Human-readable error message",
"error": {
// Optional additional error details
}
}HTTP Status Codes
200
OK
Successful GET request
201
Created
Successful POST request creating a resource
400
Bad Request
Invalid request parameters or body
401
Unauthorized
Missing, invalid, or expired JWT token
403
Forbidden
Valid token but insufficient permissions or inactive wallet
404
Not Found
Resource or endpoint not found
500
Internal Server Error
Server-side error
Common Error Responses
Authentication Errors
Missing API Key
Cause: X-API-Key header not provided or incorrectly formatted
Resolution: Include X-API-Key: <keyId>.<secret> header
Invalid API Key
Cause: API key not found, inactive, or expired
Resolution: Verify API key is correct and active; contact support if needed
Missing JWT Token
Cause: Authorization header not provided
Resolution: Include Authorization: Bearer <token> header
Invalid JWT Token
Cause: Token signature invalid, token tampered with, or wrong issuer
Resolution: Obtain a new token via /token
Expired JWT Token
Cause: Token expiration time (exp claim) has passed
Resolution: Refresh token via /token/refresh or issue new token
Inactive Wallet
Cause: User wallet has been deactivated
Resolution: Contact support to reactivate wallet
Mint API Errors
Wallet Already Exists
Cause: Attempting to create duplicate deposit address for same chain/destination pair
Resolution: Use existing wallet from GET /mint/wallets
Invalid Source Chain
Cause: Invalid chain symbol
Resolution: Use valid chain: sol, xrp, sui, doge, zec
Invalid Destination Chain
Cause: Invalid chain symbol
Resolution: Use valid chain: base, arbitrum, katana, world, unichain
Burn API Errors
Burn Wallet Already Exists
Cause: Attempting to create duplicate burn configuration for same destination chain
Resolution: Update existing configuration via PUT /burn/wallets or use existing one
Invalid Destination Address Format
Cause: Destination address doesn't match expected format for the chain
Resolution: Verify address format matches chain requirements:
Solana: base58, 32-44 chars
XRP: starts with 'r', 25-34 chars
Sui: hex with
0xprefix, 66 charsDogecoin: starts with 'D', 'A', or '9', 34 chars
Zcash: starts with
t1, 35 chars
Missing XRP Memo
Cause: Memo not provided for XRP destination
Resolution: Include numeric memo field (1-10 digits, max: 4294967295)
Invalid XRP Memo Format
Cause: Memo contains non-numeric characters
Resolution: Use only numeric digits (0-9) in memo
XRP Memo Too Large
Cause: Memo exceeds 32-bit unsigned integer limit
Resolution: Use memo value ≤ 4294967295
Amount Below Minimum
Cause: Burn amount below minimum for the token
Resolution: Ensure amount meets minimum:
uSOL, uXRP, uSUI: 1.0 tokens
uBTC: 0.0001 tokens
uDOGE, uZEC: 0.1 tokens
Order API Errors
Failed to Retrieve Orders
Cause: Database or internal error
Resolution: Retry request; contact support if persists
Validation Errors
Invalid Request Body
Cause: Request body fails Zod schema validation
Resolution: Check error.issues for specific field errors
Missing Required Field
Cause: Required field missing from request
Resolution: Include all required fields
Error Handling Best Practices
1. Implement Retry Logic
2. Handle Token Expiration
3. Validate Before Sending
4. Log Errors Properly
5. Graceful Degradation
Rate Limiting
While not currently enforced, be mindful of request frequency:
Token Issuance: Cache tokens and reuse; don't issue new tokens for every request
Orders Polling: Poll every 10-30 seconds, not more frequently
Configuration: Cache config responses for hours, not minutes
Support and Troubleshooting
If you encounter persistent errors:
Check Status Page: Verify API availability
Review Logs: Check error messages and status codes
Validate Input: Ensure request format matches documentation
Contact Support: Email [email protected] with:
Error message and status code
Request details (sanitize sensitive data)
Timestamp of error
Your partner ID
Next Steps
Examples - See error handling in complete examples
Authentication - Review authentication requirements
Mint API - Understand mint-specific errors
Burn API - Understand burn-specific errors
Last updated