Keystone Developers
Open Keystone
Guides

Conventions

Errors

The ErrorResponse shape, the status codes you will see, and what the codes mean.

Every error from SOR has one shape:

{
  "request_id": "7f9d1c2e-...",
  "success": false,
  "error": {
    "code": "not_found",
    "message": "Service not found",
    "details": null
  }
}
FieldNotes
request_idThe same id a success would carry.
error.codeA stable, machine-readable string.
error.messageHuman-readable. May change; do not match on it.
error.detailsOptional structured context: validation errors by field, or, on the Edits API, whether the same call may work later.

Status codes

StatusWhen
400The request is malformed in a way validation could not express.
401Missing or invalid credential for the surface.
403Valid credential, but not allowed: wrong business, wrong role, or a policy that refuses.
404No such resource, or a feature that is off for this business.
409Conflict: compare-and-swap failed, a slug is taken.
422Validation error. details lists the fields.
429Rate limited. Retry after the interval in Retry-After.
500Server error. Quote the request_id.

Every endpoint in the reference lists the codes it can return, all with the ErrorResponse body.

On the Edits API

A tool call SOR refuses says what to fix: error.details.errors lists each wrong argument with its field and a message, and error.details.retryable is true when the same call may work shortly. The MCP server passes the code, the message, the fields and whether a retry may work on to the model.