Skip to main content

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

Common Causes:
  • Missing Authorization header
  • Malformed API key format
  • Revoked or expired API key
  • Using account API key where admin key is required

Authorization Errors

Common Causes:
  • Using account API key for admin-only operations
  • Insufficient permissions for the requested action

Validation Errors

Common Causes:
  • Missing required fields
  • Invalid data types
  • Values outside allowed ranges
  • Malformed JSON

Resource Errors

Rate Limiting

Rate limits are applied per API key. See our rate limits guide for details.

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:
  1. Check our status page for known issues
  2. Review your API key permissions in the dashboard
  3. Contact support with request IDs for faster debugging