Skip to content

Error details

An error response says what a caller may know: its code, what happened and, for a validation error, the fields in error. What went wrong inside, such as which policy rule refused the request, often can't be shown to every caller: it would help an attacker as much as your engineers. So every error ObjectsGrid answers is also stored as an ErrorDetail, and the response's instance is its URL. Your administrators, and the accounts you allow, follow it.

{
  "code": "ACCESS_DENIED",
  "status": 401,
  "detail": "You are not authorized to retrieve this object.",
  "instance": "https://apis.objectsgrid.com/errordetails/01JF8Q2M7XK4T9B3W6Y5N0R1ZC",
  "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
  "organizationAccountID": "org-123-4567"
}

Read an error's details

GET the instance, with your access point and an administrator's token:

curl https://apis.objectsgrid.com/errordetails/01JF8Q2M7XK4T9B3W6Y5N0R1ZC \
  -H 'X-ObjectsGrid-AccessPoint: EU' \
  -H "Authorization: Bearer $TOKEN"
{
  "id": "01JF8Q2M7XK4T9B3W6Y5N0R1ZC",
  "code": "ACCESS_DENIED",
  "domain": "objectsgrid.com",
  "status": 401,
  "title": "Not allowed by the access policy",
  "detail": "You are not authorized to retrieve this object.",
  "cause": "No rule of the access policy abac-policy--org-123-4567 (version 3) allows the action retrieve on Offer for ServiceAccount sa-42, tagged role=reporting.",
  "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
  "organizationAccountID": "org-123-4567",
  "request": {"method": "GET", "path": "/offers/o-1", "accessPoint": "EU", "service": "offers"},
  "caller": {"subjectKind": "ServiceAccount", "accountId": "sa-42", "userAgent": "shop-backend/2.1"},
  "dateCreated": "2026-12-03T10:00:00.123Z",
  "expires": "2027-03-03T10:00:00.123Z"
}
  • cause is what went wrong inside: the policy rule that refused the request, the service that failed. It is there when ObjectsGrid knows more than the response says.
  • request and caller are the request's metadata: never its body, its header values or its IP address. The values of personal query parameters (email, telephone) are removed.
  • The details are stored a second or two after the response. Read at once, as a tool following instance does, an ErrorDetail answers 404 ERROR_DETAIL_NOT_READY with Retry-After: 1: wait and read again.

The instance names apis.objectsgrid.com, as every ObjectsGrid address does; on the test platform, read the same path at testapis.objectsgrid.com.

Find an error by its trace id

Support, logs and GraphQL clients often have the request's trace id (X-ObjectsGrid-Trace-Id, traceId in an error) but not its instance. The trace id finds the request's errors, usually one, a few for a GraphQL request:

curl "https://apis.objectsgrid.com/errordetails?traceId=4bf92f3577b34da6a3ce929d0e0e4736" \
  -H 'X-ObjectsGrid-AccessPoint: EU' -H "Authorization: Bearer $TOKEN"

The answer is {"items": [...]}, oldest first. ErrorDetails are read by id or by trace id; they can't be listed or searched otherwise.

Who reads them

Administrators. A new Organization Account's default policy lets its backend service account (role = user) store your API's errors, below, but not read any: error details are for your engineers. Let others read them with a rule for the actions retrieve and list on ErrorDetail:

allow if {
    input.objectType == "ErrorDetail"
    input.action in {"retrieve", "list"}
    some t in input.subject.tags
    t.name == "security.role"
    t.val == "developer"
}

The account that got an error has no right of its own to read its details, so a leaked key doesn't read them. ErrorDetails are never read anonymously and have no JSON-LD document.

What is kept

Every error answered to an authenticated caller of your Organization Account, REST and GraphQL: there is no cap. A request with no account, such as one without a valid token, has nobody to own its details: its error has no instance. ErrorDetails are kept 90 days, in your access point's region, in a storage bucket of their own: exporting your business objects never includes them. They can't be changed or deleted. Storing ObjectsGrid's own errors is free; reading them is billed as any read.

Your own API's errors

Your API can do the same for its callers: keep the response safe, and store what went wrong for your engineers. Your backend stores the error with POST /errordetails (or 100 at a time with POST /errordetails/batch), and your API returns its URL:

curl -X POST https://apis.objectsgrid.com/errordetails -H 'X-ObjectsGrid-AccessPoint: EU' -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' -d '{
    "code": "ORDER_LOCKED", "domain": "example.com", "status": 409,
    "detail": "The order is locked.",
    "cause": "Locked by the nightly export, job 8812",
    "traceId": "0af7651916cd43dd8448eb211c80319c",
    "request": {"method": "PATCH", "path": "/orders/42"}}'
  • code, domain and status are required. The code is one of your error catalog's, and the domain its DefinedTermSet's; objectsgrid.com is ObjectsGrid's own and is refused.
  • ObjectsGrid sets id, organizationAccountID, dateCreated and expires. The answer is 201 with the ErrorDetail and its URL in Location.
  • A traceId (32 hex characters) finds it with ?traceId= too.
  • Each one stored is billed as a write. Don't put personal data in cause or request: an ErrorDetail can't be erased before its 90 days.

GraphQL

A GraphQL error carries the same instance and traceId in its extensions, and errorDetail(id) reads the details, the id being the last part of the instance:

{ errorDetail(id: "01JF8Q2M7XK4T9B3W6Y5N0R1ZC") { code status cause request { method path } caller { accountId } } }

Errors of GraphQL itself, such as a query that doesn't parse, have no details stored.