Skip to main content
Every error from the Office Hours API looks the same. You get a standard HTTP status code, a small JSON body, and a few headers you can rely on.

The error body

Every error body has these four fields and nothing else.

Status codes

The API only returns the error statuses below. Each one maps to a single error code.

Headers

Error responses include these headers.

Validation errors

When a request fails validation, the 400 response names the invalid fields by path. It never echoes their values back.

Handling errors

  • 429 and 503. Wait for the number of seconds in Retry-After, then retry.
  • Other 4xx errors. Retrying the same request won’t help. Fix the request first.
  • 500 errors. Note the requestId and send it to your Office Hours representative so we can trace the failure.
Here’s what a 404 looks like in full.