Skip to Content

Getting Started

Errors

The status codes the API returns, the shape of each error body, and the error codes you can match on.

A failed request returns a non-2xx status and a JSON body that says what went wrong. Match on the status first, then on the error code when there is one.

Status codes

StatusMeaningRetry
200Success.
207Ingest only. Some events were stored and some were rejected.Fix the rejected events
400The request is malformed, such as an ID that isn't a valid UUID.No
401The API key is missing, malformed, revoked, paused, or expired.No
402Your plan's monthly limit is used up.No
403The key isn't allowed this request.No
404The engine or memory space doesn't exist in the key's workspace, or the route doesn't exist.No
409The request conflicts with the current state.Yes
413The body is too large.No
422A field failed validation, or every event in an ingest was rejected.No
429A rate limit was hit.Yes, after Retry-After
500, 502, 503, 504Docklee couldn't complete the request.Yes

Error bodies

Most errors carry a detail message:

{
  "detail": "Invalid API key."
}

Errors from ingest also carry a machine-readable code:

{
  "detail": {
    "error": "ke_runtime_denied",
    "message": "API key does not enable the KE runtime."
  }
}

Validation errors list each field that failed:

{
  "detail": [
    {
      "loc": ["body", "top_k"],
      "msg": "Input should be less than or equal to 50",
      "type": "less_than_equal"
    }
  ]
}

Error codes

CodeStatusMeaning
missing_destination422An ingest named neither a container nor a memory_space_id.
invalid_memory_space_id400The memory_space_id isn't a valid UUID.
ke_runtime_denied403The key doesn't include the Knowledge Engines runtime.
rate_limit_exceeded429An ingest rate limit was hit.

Per-event errors

An ingest reports each rejected event in errors, with the event's index:

CodeMeaning
duplicate_eventThe same content arrived within 60 seconds.
memory_space_not_authorizedThe key can't write to the memory space.
ke_ingestion_failedThe event couldn't be stored in the container. The message says why.
dum_ingestion_failedThe event couldn't be stored in the memory space. The message says why.

In the SDKs

Each status maps to its own error class, such as AuthenticationError for 401 and RateLimitError for 429. See Errors and retries.

Next steps

You can read every error. Learn how much traffic a key can send next.

On this page