Skip to main content
The Qwairy API returns two error shapes depending on where the failure occurs:
  • Resource errors (validation and not-found errors raised inside an endpoint) return a nested object: { "error": { "code", "message" } }. Use the code for programmatic handling.
  • Authentication and rate-limit errors (raised by the API gateway before the endpoint runs — 401 and 429) return a flat object: { "error", "message" }. Here error is a short status label, not a machine-readable code.
Always branch on the HTTP status first, then read the body in the shape matching that status.

HTTP Status Codes

Error Response Format

Resource errors (nested)

Validation and not-found errors raised inside an endpoint return a structured error object:
object

Authentication & rate-limit errors (flat)

401 (authentication) and 429 (rate limit) responses are produced by the API gateway and use a flat shape — error is a short status label, not a code:
string
Short status label (e.g. Unauthorized, Too Many Requests).
string
Human-readable description of the failure.
429 responses additionally include limit ("burst" or "daily") and retryAfter (seconds).

Error Codes Reference

Authentication & Authorization

Not Found

Bad Request

Rate Limiting

Server Errors

Common Errors

Authentication Errors (401)

Authentication failures use the flat shape:
Solution: Ensure you’re using a valid token with the correct Bearer prefix, on a Growth plan or higher.

Permission Errors (403)

Solution: Verify you have the correct permissions and plan level.

Not Found Errors (404)

Solution: Check that the resource ID is correct and belongs to your team.

Rate Limit Errors (429)

Rate-limit responses use the flat shape and add limit and retryAfter:
limit is "burst" (per-minute) or "daily". Solution: Wait retryAfter seconds (or until the X-RateLimit-Reset / X-RateLimit-Daily-Reset timestamp), then retry. See Rate Limits.

Server Errors (500)

Solution: Retry after a few seconds. If the error persists, contact support.

Handling Errors

JavaScript/TypeScript Example

Python Example

Need Help?

If you encounter persistent errors or unexpected behavior, contact us at team@qwairy.co with:
  • The endpoint you’re calling
  • The full error response
  • Your request headers (without the token)
  • The timestamp of the request