Errors

The error envelope, every error code with its status, and how to react to each.

After this page you will be able to recognise every error the Workspace API returns and decide whether to fix the request, escalate or retry.

Prerequisites: none beyond a working call (see Overview).

The error envelope

A failed call answers with a non-2xx status and the same envelope as a success, with success: false:

{
  "success": false,
  "message": "Validation failed",
  "code": "VALIDATION_ERROR",
  "errors": ["limit: Too big: expected number to be <=100"],
  "meta": { "timestamp": "2026-07-14T09:40:17.884Z" }
}
FieldMeaning
successAlways false.
messageA human-readable explanation. It can change: do not parse it.
codeA stable, machine-readable code. Branch on it.
errorsOptional details. One string per problem for VALIDATION_ERROR, the supported versions for UNSUPPORTED_VERSION.
meta.timestampWhen the answer was produced (UTC). Quote it when you contact support.

A 401 may arrive without this body: rely on the HTTP status for it.

Error codes

StatuscodeWhenWhat to do
401UNAUTHORIZEDThe API key is missing or invalid.Check the Authorization: Bearer <api key> header and the key. Do not retry unchanged. See Authentication.
403FORBIDDENThe key is valid but lacks the permission of the route (reviews:read for the reviews routes).Ask your workspace admin for a key with the permission.
404NOT_FOUNDThe review does not exist, the id is malformed, the review belongs to another workspace, or the route does not exist.Check the id and the path.
404UNSUPPORTED_VERSIONThe version in the path is not supported. errors lists the supported versions.Use one of the listed versions. See Versioning.
422VALIDATION_ERRORA query parameter is invalid or out of range, a parameter is unknown, or the cursor is invalid or belongs to another sort.Fix the request using errors. Retrying unchanged fails again.
500INTERNAL_ERRORUnexpected failure on our side.Retry once; if it persists, contact support with meta.timestamp.
503UNAVAILABLEThe service cannot answer right now. Temporary.Retry with exponential backoff.

Examples of errors for a 422:

RequestEntry in errors
?limit=500limit: Too big: expected number to be <=100
?countryCode=DEquery: Unrecognized key: "countryCode"
?cursor=abccursor: cursor is not valid
a cursor from sort=createdAt used with sort=ratingcursor: cursor does not belong to this sort

Each entry starts with the parameter name (or query for an unknown parameter). The wording after the colon is meant for people and can change.

Retrying a 503

503 is temporary and the calls of this API are read-only, so retrying the same request is safe. We recommend exponential backoff with a few attempts and a little random jitter:

const delayMs = 1000 * 2 ** attempt + Math.random() * 250; // 1 s, 2 s, 4 s, 8 s
await new Promise((resolve) => setTimeout(resolve, delayMs));

Do not retry 401, 403, 404 or 422 without changing something: the answer will be the same.

Handling errors in code

const response = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } });
if (response.status === 401) throw new Error("API key missing or invalid"); // maybe no JSON body
if (!response.ok) {
  const error = await response.json();
  switch (error.code) {
    case "VALIDATION_ERROR": throw new Error(error.errors.join("; "));
    case "UNAVAILABLE": /* retry with backoff */ break;
    default: throw new Error(`${response.status} ${error.code}`);
  }
}

We recommend that your client also ignores unknown fields and unknown code values by treating them like their status class.

Next steps


Did this page help you?