Skip to main content

Error Response Format

All API endpoints return errors in a consistent JSON format:
Some endpoints may include additional context-specific fields:

HTTP Status Codes

The API uses standard HTTP status codes to indicate the type of error:
Client Error: The request was invalid or missing required parameters.Common Causes:
  • Missing required fields
  • Invalid parameter values
  • Business logic violations (e.g., claiming more tokens than available)
  • Invalid Base58 characters in addresses
Example:
Resource Not Found: The requested resource doesn’t exist.Common Causes:
  • Token not found in database
  • Token not launched through this API
  • Invalid transaction keys
Example:
Rate Limited: Client has exceeded the request rate limit.Rate Limit: 8 requests per IP per 2-minute windowResponse:
Handling: Implement exponential backoff and respect rate limits.
Server Error: An unexpected error occurred on the server.Common Causes:
  • Missing environment configuration
  • Blockchain network issues
  • Database connectivity problems
  • External service failures (Helius, IPFS)
Example:

Error Categories

Validation Errors (400)

Input validation and business rule violations:
Solution: Check endpoint documentation for required fields.
Solution: Use valid Base58 characters only.
Solution: Check claim eligibility before creating transactions.
Solution: Complete the full flow within the timeout window.

Configuration Errors (500)

Server configuration and environment issues:
Solution: Contact support - this is a server configuration issue.
Solution: Check health endpoint and contact support if persistent.

Blockchain Errors (500)

Solana network and transaction issues:
Solution: Check account balances and retry with fresh transaction.
Solution: Retry request - may be temporary network congestion.

Best Practices

Error Handling Strategy

Exponential Backoff

Implement exponential backoff for rate limiting and transient errors:

User Experience

  • Show simple error messages to users
  • Log detailed errors for developers
  • Provide helpful suggestions when possible
  • Show loading indicators during API calls
  • Disable buttons to prevent duplicate requests
  • Provide cancel options for long operations

Error Prevention

Validation Before API Calls

Debugging Tips

Always check /health when debugging configuration issues:
Track your request frequency to avoid hitting limits:
Monitor transaction timing to avoid timeouts: