Flux API returns standard HTTP status codes along with detailed error information. This reference documents all possible error responses.
All error responses follow this format:
{
"error": "ERROR_CODE",
"message": "Human-readable error description",
"code": 400,
"details": {
"field": "Additional context"
}
}
HTTP Status Codes
400 Bad Request
The request was malformed or missing required parameters.
Request body is invalid JSON
Malformed JSON in request body
Required parameter missing: {param}
Missing required query or body parameter
Invalid parameter value: {param}
Parameter value doesn't match expected format
API ID doesn't match expected format
Endpoint path contains invalid characters
401 Unauthorized
Authentication failed or credentials are invalid.
X-Signature header is required
Missing signature header in gateway request
X-Payment-Tx header is required
Missing payment transaction header
Signature verification failed
Signature doesn't match message or wallet
Signature timestamp is too old
Signature older than 5 minutes
Wallet address could not be recovered
Signature doesn't correspond to valid wallet
Request requires wallet connection
402 Payment Required
Payment verification failed.
Transaction not found on chain
Transaction hash doesn't exist on blockchain
Payment amount is less than required
Transaction amount is below API price
Payment on wrong blockchain
Transaction is on different chain than expected
Transaction not yet confirmed
Transaction is pending, not yet mined
Transaction failed on-chain
The request is valid but not allowed.
You don't have permission for this action
User doesn't own the resource
This API is currently disabled
Provider has disabled the API
Too many requests in short time
Provider account has been suspended
The requested resource doesn't exist.
Target API endpoint doesn't exist
The request conflicts with existing data.
API with this name already exists
Duplicate API name for provider
Endpoint already registered
Endpoint URL already in use
422 Unprocessable Entity
The request is valid but cannot be processed.
OpenAPI specification is invalid
OpenAPI spec doesn't conform to standard
Price must be greater than 0
Price is zero or negative
Currency is not ETH or USDC
Target endpoint is not reachable
Cannot connect to target API
429 Too Many Requests
Rate limit has been exceeded.
Rate limit exceeded. Retry after {seconds} seconds
Too many requests in time window
Monthly request limit reached
500 Internal Server Error
An unexpected server error occurred.
An unexpected error occurred
Database operation failed
Database connectivity issue
Blockchain operation failed
Issue connecting to blockchain
Failed to proxy request to target API
Error forwarding request to target
502 Bad Gateway
The gateway received an invalid response from the target API.
Target API returned invalid response
Target API response is malformed
Request to target API timed out
Target API didn't respond in time
503 Service Unavailable
The service is temporarily unavailable.
Service is temporarily unavailable
Server maintenance or overload
Blockchain network is unavailable
Cannot reach blockchain network
Common Error Scenarios
Scenario: Making a Gateway Request
Problem: Getting 402 Payment Required
Checklist:
Verify transaction hash is correct and mined
Confirm payment amount meets API price
Check transaction is on correct blockchain
Ensure signature is fresh (within 5 minutes)
Scenario: Creating an API
Problem: Getting 422 Unprocessable Entity
Checklist:
Validate OpenAPI specification format
Ensure price is greater than 0
Verify endpoint URL is reachable
Check currency is ETH or USDC
Scenario: Authentication Failure
Problem: Getting 401 Unauthorized
Checklist:
Verify X-Signature header is present
Confirm X-Payment-Tx header is present
Check signature was generated correctly
Ensure timestamp is recent
For transient errors (5xx, 429), implement exponential backoff:
For issues not covered here:
Email: chirag@useflux.site
Last updated