RememberStackremember.dev/docs

Errors and status codes

This page collects every error a client can meet: HTTP statuses from a deployment, the codes SQL queries report, the structured errors the MCP tools return, and the status values that appear in results.

A "no" that is an answer — nothing matched, the entity is unknown, a limit was reached — is not an error. It comes back as 200 with a typed negative in the envelope. Read that first when a result is empty.

Error shapes

A deployment's error body always has one key, detail:

FormExample
String{"detail": "body_too_large"}
Object with code{"detail": {"code": "forget_in_progress"}}
Object with code and message{"detail": {"code": "invalid_parameter", "message": "unknown argument(s): limit"}}
Validation list{"detail": [{"type": "less_than_equal", "loc": ["query", "k"], "msg": "Input should be less than or equal to 400", "input": "500", "ctx": {"le": 400}}]}

Branch on the status and the code or string, not on message.

The remember Python client raises remember.MemoryApiError for all of them, with status_code (0 for a network failure), detail (the string, or the message) and code (set on /query/* routes when the body carries a known code at its expected status). A 429 raises its subclass remember.RateLimited, whose code is rate_limited or concurrency_limited and whose retry_after holds the Retry-After seconds. wait_for_readiness raises remember.PipelineDeadLettered when a stage it waits on is dead_letter (Python SDK).

Deployment HTTP statuses

StatusdetailMeaningWhat to do
400cursor is malformedGET /documents got a cursor it cannot read.Restart paging without a cursor.
401a perimeter credential is requiredNo Authorization header, and the deployment requires one.Send Authorization: Bearer <token>.
401perimeter authentication failedThe credential is not accepted: wrong secret, bad signature, expired, revoked, or unknown signing key.Get a fresh token.
403credential is for another deploymentThe credential is valid for a different deployment.Use the token issued for this deployment, or the right REMEMBER_API_URL.
403credential may not perform this operationThe credential's scope does not cover the route (for example a read credential on POST /ingest or DELETE /documents/{doc_id}, or an ingest credential on GET /deployment).Use a write credential. See Scopes.
404Not FoundNo such route (includes /connectors* and /openapi.json, which a stock deployment does not serve).Check the path.
404document_not_foundDELETE /documents/{doc_id} for a document that does not exist or is already deleted.Do not retry; check the id with GET /documents.
404the operation namePOST /operations/{name} with a name that is not one of the four.Use GET /operations for the names.
404{"code": "saved_query_not_found", …}No saved query or version by that name.Check GET /query/saved.
405Method Not AllowedRight path, wrong method.Check the method.
409source_forgottenPOST /ingest of bytes or a source identity (source_kind + source_ref) that a hard forget removed. A forget is permanent.Do not retry; the deployment will not take this content back.
409{"code": "saved_query_…", …}A saved query cannot run. See SQL query codes.See the code.
411length_requiredPOST /ingest without Content-Length on a deployment that caps bodies.Send the length (curl and the remember client do).
413body_too_largeThe ingest body is over the cap.Split the document.
422validation listA parameter or body field is missing, of the wrong type, out of range, or not declared. Includes a valid_at or believed_at without a zero UTC offset, and an unknown status on GET /query/saved.Fix the request; loc names the field.
422{"code": "invalid_parameter", …}An operation argument or SQL-query argument was refused.Fix the argument named in message.
422source_kind and source_ref must be supplied togetherIngest with half a source identity.Send both or neither.
422source timestamps, revisions, and living mode require source_kind/source_refIngest lineage options without a source identity.Add source_kind and source_ref.
422source_modified_at must be timezone-aware UTCIngest timestamp without an offset or with a non-zero one.Send it with Z.
422X-Ingest-Principal-Kind and X-Ingest-Principal-Ref must be supplied togetherTrusted attribution with one header.Send both or neither.
422invalid_ingest_principalTrusted attribution with an unknown kind or bad reference.Kind is user, api_credential or service; reference is 1–255 printable ASCII characters.
429{"code": "rate_limited", …}The credential or the deployment has used its request rate (admission limits, off unless configured).Wait the Retry-After seconds, then retry.
429{"code": "concurrency_limited", …}Too many requests of the credential or the deployment are running at once.Wait for your other requests to finish (Retry-After is 1), then retry.
500Internal Server ErrorAn unhandled failure: a defect.Report it.
503{"code": "forget_in_progress"}A hard forget is running; the deployment accepts no traffic until it finishes.Retry later.
503model provider unavailableA search, lookup, resolve or assured-operation call could not embed its query.Retry with back-off.
503live graph is busyNo graph traversal slot was free in time.Retry with back-off.
503live graph result unavailableA traversal and the rows it pointed at disagreed.Retry.
503live graph timed outA traversal ran past its time limit, or its database connection failed.Retry with back-off; narrow hops, max_hops or predicates if it persists.
503{"code": "…_unavailable", …}A store needed by a SQL query was unavailable. See SQL query codes.Retry with back-off.

SQL query codes

SQL queries report problems with one of 27 codes. For the statement routes (POST /query/sql, POST /query/sql/explain, POST /query/saved/{namespace}/{name}/run), a problem with the statement itself comes back as 200 with the code in the result's error_code and termination_reason rejected or failed. A code raised outside the statement — a saved query that cannot run, a refused discovery argument — is an HTTP error at the status below, with {"detail": {"code": "…", "message": "…"}}.

CodeHTTP statusMeaningWhat to do
parse_error422The SQL does not parse, or contains a NUL byte.Fix the syntax.
multiple_statements422More than one statement.Send one statement.
statement_not_allowed422Not a read-only SELECT/VALUES/WITH, or uses a construct outside the grammar (row locks, SELECT INTO, TABLESAMPLE, WITHIN GROUP, a reserved __rememberstack_ name).Rewrite within the grammar.
relation_not_allowed422A table, view or schema outside memory_v1.Use the views.
function_not_allowed422A function not on the allowlist (including now()), a qualified function outside memory_v1/pg_catalog, a table function, an XML expression or a session keyword.Use an allowed function; pass times as parameters.
function_placement_not_allowed422A public function outside a top-level FROM item, packed with others in ROWS FROM, or given a computed argument.Follow the placement rules.
operator_not_allowed422An operator or cast type outside the allowlist.Use an allowed operator or cast.
invalid_parameter422Wrong parameter count, non-contiguous placeholders, too many or too large parameters, SQL text over 65,536 bytes, a bad filter, k below 1, a graph function without $1 as this deployment's id, or a graph call with only one clock.Fix the parameters.
unbounded_recursion422A recursive CTE that does not follow the template, or more than one.Follow the recursion template.
schema_version_mismatch409The database's memory_v1 views do not match the server's manifest.An operator must finish the upgrade (migrations).
quota_exceeded409More than 3 function calls of one category, the statement's 200-candidate search budget is spent, the per-minute statement-time budget is spent, or the operator has disabled SQL queries.Simplify the statement or wait a minute.
concurrency_exceeded409Too many statements running for this caller (2) or deployment (8).Retry after the others finish.
saved_query_not_found404No saved query or version by that name, or the deployment has no registry.Check GET /query/saved.
saved_query_disabled409The saved query is disabled, or the version is a draft, deprecated or broken.Run an active version.
saved_query_incompatible409A saved-query version failed a validation or activation check (raised by the deployment's authoring tooling, not by the HTTP routes).Revalidate the version.
saved_query_revalidation_pending409The query space changed since the version was validated.Revalidate the saved query.
statement_timeout500The statement ran past its timeout.Narrow the statement, add filters or a LIMIT.
lock_timeout500A lock was not available within the lock timeout.Retry.
cancelled500The statement was cancelled. Not produced by this release.Retry.
resource_limit500Memory, temporary-file or connection limits were exceeded.Narrow the statement.
execution_error500The statement failed while running (for example a bad cast of a parameter), or the saved-query registry could not be read.Check parameter values and casts.
pg_unavailable503The database is unavailable.Retry with back-off.
p1_unavailable503The search index could not be searched or read, or no embedder is configured.Retry; check readiness (p1).
graph_unavailable503A graph function returned no usable status.Retry; check readiness (live_graph).
corpus_body_unavailable503Chunk text could not be read. Not produced by this release.Retry.
generation_unavailable503The search index has no usable embedding generation, or requested chunks span more than one.Retry after indexing completes; fetch chunks from one generation.
confirmation_failed500Nominated rows could not be confirmed against the database.Retry.

When a code arrives inside a 200 result, termination_reason is rejected if the statement was refused before the engine opened a transaction (parse and grammar codes, unbounded_recursion, parameter-count and size problems, quota_exceeded, concurrency_exceeded, schema_version_mismatch), and failed if it was refused or failed after that (bad search filters, timeouts, store codes).

MCP tool errors

The MCP server returns a tool failure as a normal tool result with "isError": true and one JSON text block. Every tool — ingest, pipeline_readiness, delete_document, the assured operations and the SQL query tools — returns the same object:

{
  "error": {
    "code": "body_too_large",
    "status_code": 413,
    "detail": "Ingest body exceeds the deployment size limit.",
    "retryable": false,
    "agent_action": "Split or shorten the document; do not retry the same payload."
  }
}

status_code is the deployment's HTTP status, 0 when no answer arrived, and null when the call never reached the deployment. reason_code, request_id and retry_after (seconds) appear only when known. When the deployment sent its own code — a SQL query code from the tables above, or rate_limited / concurrency_limited — code is that code.

codestatus_coderetryableagent_action
invalid_argumentsnullnoFix the tool arguments and retry. (Or, when more than one body was given: Supply exactly one body source: path, text, or content_base64.)
unknown_toolnullnoCall tools/list and use one of the listed tools.
project_routing_unavailablenullnoCall the tool again without project.
read_onlynullnoTell the user this server cannot change memory.
source_lineage_pairnullnoSend both source_kind and source_ref, or neither. (Or: Provide source_kind and source_ref together with lineage fields.)
empty_bodynull, or the deployment'snoProvide non-empty path / text / content_base64 content.
encoding_errornullnoRemove lone surrogates / invalid code points, or send content_base64 for binary.
path_not_allowednullnoPass a clean filesystem path without NUL characters. / Use text or content_base64, or ask the operator to configure REMEMBERSTACK_MCP_INGEST_ROOTS. Do not retry path until roots are set. / Place the file under an allowlisted root, or use text/content_base64. Ask the operator to extend roots only when intentional.
path_not_regular_filenullnoPoint path at a regular file, or send text/content_base64.
path_unreadablenullnoPass a regular filesystem file path. / Check path on the machine running the MCP server (not the remote engine host).
path_too_largenullnoSplit the file, raise the local resource guard only if intentional, or use a deployment that publishes a higher capability limit. / Split the file or raise the configured read cap.
document_not_found404noDo not retry. Check the doc_id; if the user meant this document, it is already gone from memory.
forget_in_progress503yesRetry the same delete later with back-off; the deployment accepts no changes until the forget finishes.
body_too_large413noSplit or shorten the document; do not retry the same payload.
unauthorized401noThe key is missing, expired or revoked: run remember login or replace REMEMBER_API_KEY.
insufficient_permission403noThe key may not do this here: use a key with the needed permission for this deployment.
rate_limited, concurrency_limited429yesWait retry_after seconds (if given), then retry; do not retry sooner. Lower the request rate or run fewer calls at once.
SQL query codesas sent, or null when refused before sendingfor quota_exceeded, concurrency_exceeded, timeouts and store codesRetry later with back-off. / Read the detail and fix the query or its arguments.
engine_client_errorthe HTTP status (4xx)noRead the detail; fix the call. Do not retry it unchanged.
engine_unavailablethe HTTP status (5xx)yesRetry with back-off (3–5 attempts, 2s→30s). If still failing, report an operator outage.
transport_error0yesRetry with back-off; check the deployment URL and network.
local_backend_errornullnoReport a composition/contract defect; do not retry the same call.
internal_errornullnoUnexpected internal failure. Do not busy-retry; report the error (and any request_id) to an operator or as a product defect.

JSON-RPC errors

CodeMessageCause
-32700the parse errorThe request line is not JSON.
-32600invalid JSON-RPC request / request is not an objectNot a JSON-RPC 2.0 request.
-32601unknown method '<name>'A method other than initialize, ping, tools/list, tools/call.
-32602bad initialize params / bad params / bad argumentsMalformed parameters.
-32603the error texttools/list could not read the deployment (unreachable, or the key was refused).

See MCP tools.

Status values

Document version status

ValueMeaning
ingestingStored; conversion not started.
convertingBeing converted to Markdown.
structuringBeing split into sections.
readyConverted and structured. Extraction may still be running; use readiness.
failedConversion or structuring failed; error says why.
deletedDeleted. Not listed by GET /documents.

Pipeline stage status

ValueMeaning
missingNo work exists yet for this stage and component version.
pendingQueued.
runningIn progress.
succeededDone.
skippedNot needed for this version; counts as done.
failedThe last attempt failed and a retry is scheduled. Keep waiting.
dead_letterFailed for good: every attempt is used. Stop waiting and report it. The Python client's wait_for_readiness raises remember.PipelineDeadLettered here, naming the version and stage.

Readiness capability reasons

See Ingest.

Saved query status

ValueRuns?Meaning
draftnoWritten, not activated.
pending_revalidationnoWas active; the query space changed and it must be revalidated.
activeyesThe version that runs.
deprecatednoReplaced by a newer version.
disablednoTurned off.
brokennoFailed validation.

SQL query termination reason

completed, rejected, failed. See SQL queries.

Connector status

active, paused, error. The connector routes are not served by a stock deployment in this release.