Error Response Format
Always include the
requestId when contacting support about an API error. It enables fast lookup
in the request logs.HTTP Status Codes
Validation Errors
When a request fails validation (status400), the error field contains the validation details as a JSON string. The structure follows Zod’s flatten() format:
error field to extract per-field validation messages:
Common Error Scenarios
- Authentication
- Permissions
- Not Found
- Rate Limiting
401 — Missing tokenFix: Include a valid Fix: Refresh your session token and retry.
Authorization: Bearer <token> header or X-API-Key header.401 — Expired tokenError Handling Best Practices
Production vs Development
In production, the API returns generic error messages for500 errors to avoid leaking internal details: