Errors and troubleshooting¶
Error responses¶
A REST API error answers with an HTTP status and an ErrorResponse body:
{
"type": "https://objectsgrid.com/docs/error-details/validation-failed/",
"code": "VALIDATION_FAILED",
"domain": "objectsgrid.com",
"title": "The object isn't valid",
"detail": "The object is not valid",
"instance": "org-123-4567/1f6e4d0c-2b3a-4c5d-8e9f-a0b1c2d3e4f5",
"message": "The object is not valid",
"reasons": ["/sku: required"],
"httpStatusCode": 400,
"httpStatusText": "Bad Request",
"timestamp": 1763025002,
"correlationId": "4bf92f3577b34da6a3ce929d0e0e4736",
"errorDetailsLink": "https://objectsgrid.com/docs/error-details/validation-failed/"
}
The body follows RFC 9457 (Problem Details for HTTP APIs) with ObjectsGrid's own fields:
codesays what happened, such asVALIDATION_FAILEDorCART_CHECKED_OUT. Act on it, not on the message: a code never changes meaning, while messages get better.domainisobjectsgrid.com, who defines the code.type(anderrorDetailsLink, the same) is the code's page in Error details: what happened, the usual causes and how to fix it.titleis the code's fixed summary.message(anddetail, the same) explains this occurrence;reasonsgives the details, such as each field in error.correlationId(andinstance, the same) identifies the request: give it to support.
An error without a code of its own yet answers with its status's generic code, such as CONFLICT: match on the
codes you handle, and treat the rest by status. Programs and agents read every code at
/.well-known/error-details/index.json. The OAuth
token endpoint answers the errors of OAuth 2.0 instead ({"error": "invalid_grant"}), as OAuth clients expect.
The GraphQL API returns the same information in its errors array; see GraphQL errors.
Status codes¶
| Status | Meaning | What to do |
|---|---|---|
400 Bad Request |
The request isn't valid: a missing or wrong field, a bad query. | Fix the request; reasons says what is wrong. |
401 Unauthorized |
No valid access token, or your ABAC policy doesn't allow the request. | Get a new token if yours expired; otherwise check your policy and the account's tags. |
404 Not Found |
No object with that id. | Check the id, and that you use the right X-ObjectsGrid-AccessPoint. |
405 Method Not Allowed |
The type doesn't support this operation. | See the type's page in the object reference. |
409 Conflict |
The id is already used (Enums), or the object kept changing while it was written. | Choose another id, or retry. |
412 Precondition Failed |
If-Match or expectedVersion isn't the current version. |
Read the object again, reapply your change, retry. |
413 Payload Too Large |
The body or an object is too large. | See the size limits. |
429 Too Many Requests |
Rate limit, or your monthly spending cap, reached. | Back off and retry; check X-ObjectsGrid-Quota-Used. See Usage and limits. |
500 Internal Server Error |
Something went wrong on our side. | Retry later; if it persists, contact support with the correlation id. |
Correlation ids¶
Every response, success or error, carries the request's correlation id:
It is the request's trace id, the same as X-ObjectsGrid-Trace-Id: one id finds the request in error
bodies, logs, traces, webhooks and access logs. All the REST calls of one GraphQL request share it. It is in error
bodies too, as correlationId and instance, and in GraphQL errors as extensions.correlationId. Log it in your app with every failed request. With it, you can find the request in your access log, and support can find it in ours.
If you send your own session id in X-ObjectsGrid-SessionID, it is recorded with the request and returned in the response.
Trace ids¶
Every response, REST or GraphQL, also carries the request's OpenTelemetry trace id:
GraphQL responses carry it in the body too, as extensions.traceId. The last part of traceresponse says whether the request was recorded in detail: 01 recorded, 00 not.
To have a request recorded, for example to reproduce a problem for support, send:
A few requests a minute can be forced. If the response ends in -00, the request wasn't recorded: retry a little later. Your own traceparent header doesn't choose the trace id or whether a request is recorded.
Before you contact support¶
Collect:
- the correlation id (the trace id), and the trace id of a forced request if you can reproduce the problem,
- the time of the request, its method and path, and your access point,
- what you expected and what happened.
Then contact support. Don't send access tokens, refresh tokens or secrets.