Standard Error Format
Common Status Codes
HTTP Code | Meaning | Typical Cause |
---|---|---|
400 | Bad Request | Malformed JSON or missing fields |
401 | Unauthorized | Missing or invalid token |
403 | Forbidden | Valid token but access not allowed |
404 | Not Found | Invalid ID or resource does not exist |
409 | Conflict | Invalid state change (e.g., cancelling a PAID checkout) |
422 | Unprocessable Entity | Validation failed (e.g., wrong types or values) |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Something went wrong on Gale’s side |
Debugging Tips
- Always validate your request body matches the documented schema.
- Ensure your token is correct, present, and has the right permissions.
- Watch for detailed field-level errors in the
details.field_errors
object. - For transient errors (429, 500), retry with backoff.