Codes follow scope/problem. Errors thrown by the SDK are Error objects whose message is the code (sometimes followed by : status body). Server errors arrive in result.error or result.errors.
SDK errors
| Code | Cause |
|---|
sdk: call initScenid() before using the SDK | Used the SDK before initScenid |
initScenid: client_id is required / client_secret / token_uri | Incomplete service key |
sdk/unknown-service: <name> | resolveServiceUrl with an unknown service |
sdk/as-user-missing-token | asUser without an ID token |
sdk/fetch-failed | Network error |
sdk/endpoint-invalid | 404 with non-JSON body |
sdk/non-json-response | Response not JSON |
sdk/request-failed | throwOnError and no error in the response |
sdk/invalid-token-format | JWT decoding failed |
sdk/aggregate-filter-must-be-array / sdk/aggregate-sort-must-be-array | filter or sort is not an array |
Auth errors
| Code | Cause |
|---|
oauth/token-request-failed: <status> <body> | Client credentials rejected |
auth/exchange-failed: <status> <body> | Token exchange rejected |
auth/complete-flow-failed: <status> <body> / auth/complete-flow-no-token | Code exchange failed |
auth/refresh-flow-failed / auth/refresh-flow-no-token | Refresh failed |
auth/jwks-fetch-failed: <status>, auth/jwks-key-not-found | JWKS problems |
auth/invalid-signature, auth/invalid-issuer, auth/token-expired | verify failed |
auth/unauthorized | AuthenticationError (401) from a guard |
Server-side OAuth codes (in the body of the failed token request): oauth/invalid-client, oauth/invalid-client-secret, oauth/public-client-not-allowed, oauth/grant-not-allowed, oauth/unsupported-grant-type, oauth/service-key-not-provisioned, oauth/invalid-subject-token, oauth/token-audience-mismatch, oauth/tenant-mismatch, oauth/user-not-found, oauth/invalid-code, oauth/code-expired, oauth/redirect-uri-mismatch, oauth/client-mismatch, oauth/invalid-refresh-token, oauth/account-pending, oauth/account-denied, oauth/account-deactivated.
Customers
| Code | Where |
|---|
customers/missing-humanId, customers/missing-humanIds, customers/missing-entity-type | SDK argument checks |
customers/group-not-found | SDK, unknown group name |
entity/not-found | Unknown or invisible entity |
entity/data-missing, entity/data-invalid | Body has no or malformed data |
entity/wrong-entity-type, entity/wrong-target-entity-type | Wrong kind of entity for the route |
entity/parent-not-found, entity/invalid-parent | Parent problems |
entity/group-already-exists | Duplicate group name |
entity/missing-entity-type | Server: no type in list/search |
entity/pagination-window-exceeded | Paging beyond 10,000 |
relationship/roles-required, relationship/role-missing, relationship/invalid-status | Employment roles |
group/config-invalid, group/features-invalid | Group config |
journal/… | see Journal |
Insights
| Code | Where |
|---|
insights/source-not-found, source/not-found | Unknown source |
source/access-forbidden | Not allowed on this source |
doc/not-found | Unknown document |
doc/invalid-body, doc/body-not-flat, doc/reserved-field:<name> | Body problems |
doc/source-type-not-supported, doc/customers-source-not-supported | Source type does not support documents |
doc/field-type-mismatch | A value does not fit the field type |
batch/invalid-body, batch/invalid-jsonl | Batch problems |
scenid/empty-batch | SDK: empty array |
push/invalid-source-type, push/source-not-ready, push/empty-body | Push problems |
filter/unknown-operator | Docs.find on the server |
Validation errors
Validation failures answer 400 with { "errors": [{ "message": "…", "path": "name" }] }.