Error Handling
The SuprSonic API uses conventional HTTP response codes and provides structured error messages to help you handle errors gracefully in your applications.Error Response Format
All API errors follow a consistent structure:HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of requests:Error Codes
Authentication Errors
- Missing
Authorizationheader - Malformed API key format
- Revoked or expired API key
- Using account API key where admin key is required
Authorization Errors
- Using account API key for admin-only operations
- Insufficient permissions for the requested action
Validation Errors
- Missing required fields
- Invalid data types
- Values outside allowed ranges
- Malformed JSON
Resource Errors
Rate Limiting
Error Handling Best Practices
1. Always Check Response Status
2. Handle Different Error Types
3. Implement Retry Logic
4. Validate Before Sending
Debugging Tips
Enable Request/Response Logging
Common Troubleshooting
Support
If you encounter persistent errors:- Check our status page for known issues
- Review your API key permissions in the dashboard
- Contact support with request IDs for faster debugging