Skip to main content

Error codes

Riverbeam errors are Riverbase errors. Each has a stable code BEM-NNN, an HTTP status, and a user-safe message; errdata adds the detail, such as the agent name or the underlying cause. The shape and the HTTP problem format are described in Riverbase errors.

Serialized with serde_json, as a worker sends it over NATS and as the API examples on this site return it, an error looks like this:

{
"http_status": 404,
"http_title": "Not Found",
"errcode": "BEM-020",
"errmesg": "That agent is not registered.",
"errdata": "kb-assistant"
}

A worker replies with {"error": <RiverbaseError>}, and NatsWorkerClient rebuilds the error with its code, status, message, data and hint. Map http_status to the response status in your HTTP layer. Routes mounted through a Riverbase app render errors as problem documents instead; see Riverbase errors.

The errors most clients see:

CodeStatusWhen
BEM-020404agent_name is not registered
BEM-040400The content uses a modality the agent does not support
BEM-060403The user's usage plan blocked the request
BEM-061403A security rule blocked the request or the reply
BEM-067403The authorization policy denied the command
BEM-063, BEM-066400A resume request names an invalid or already resolved action
BEM-027404A resume request names an action that does not exist
BEM-096500The API's NATS request to a worker failed or timed out

Requests and payloads​

Serialization and payload validation.

CodeStatusMessage
BEM-001422Failed to serialize the beam invoke request.
BEM-002422Failed to encode the worker task payload for NATS.
BEM-003422The invoke_agent worker payload is not a valid invoke request.
BEM-004422Knowledge ingest requires inline text; media and URL ingest are host-bound.
BEM-005422Knowledge delete requires a valid document_id.
BEM-006422Report queries are not supported for this beam resource.

Not found​

Agents, commands, resources and actions that do not exist.

CodeStatusMessage
BEM-020404That agent is not registered.
BEM-021404That agent is not registered for stream dispatch.
BEM-022404The invoke pipeline could not resolve the requested agent.
BEM-023404That agent is not in the beam catalog.
BEM-024404That command is not registered in the beam domain.
BEM-025404That query resource is not registered in the beam domain.
BEM-026404That catalog item was not found.
BEM-027404That agent action was not found.
BEM-028404That agent action could not be resolved because it was not found.

Routing and knowledge setup​

Modalities, models, the routing file, and the knowledge subsystem.

CodeStatusMessage
BEM-040400The agent does not support the requested input modalities.
BEM-041422No model is available for this request.
BEM-042500The selected model configuration is invalid.
BEM-043500Failed to read the model routing YAML file.
BEM-044500Failed to parse the model routing YAML file.
BEM-045501The knowledge subsystem is not configured on this worker.
BEM-046500Failed to serialize the agent invoke result.
BEM-047500Failed to serialize the knowledge ingest result.

Policy and resume​

Quota, security, authorization, and human-approval resume checks.

CodeStatusMessage
BEM-060403The usage quota for this request has been exceeded.
BEM-061403A security rule blocked this request.
BEM-062400Resume requires the pending interaction identifier.
BEM-063400Resume received an invalid action identifier.
BEM-064400Resume referenced an unknown pending action.
BEM-065400Resume action does not belong to the pending interaction.
BEM-066400Resume action is not pending.
BEM-067403This beam command is not allowed for the current subject.

Agent execution​

Completion clients, the agent stream, and the tool loop.

CodeStatusMessage
BEM-080422The scripted completion client lock was poisoned.
BEM-081422The scripted completion client has no remaining steps.
BEM-082422The language-model completion request failed.
BEM-083422The language-model completion response could not be decoded.
BEM-084422The language-model completion returned an error status.
BEM-085422The language-model completion response has no choices.
BEM-086422The agent stream ended without a terminal done frame.
BEM-087422The agent stream reported an error frame.
BEM-088422The agent tool loop exceeded the maximum number of steps.
BEM-089422The agent requested an unknown tool during the tool loop.
BEM-090422The agent requested an unknown tool while resuming actions.

Worker, transport and sandbox tools​

Worker tasks, NATS, stream publishing, and sandbox tool arguments.

CodeStatusMessage
BEM-091404That worker task is not registered.
BEM-092501That worker memory task is not implemented yet.
BEM-093500The worker failed to connect to NATS.
BEM-094500The worker failed to subscribe to NATS task subjects.
BEM-095500The domain client failed to connect to NATS.
BEM-096500The domain client failed to request a worker task over NATS.
BEM-097500The domain client failed to publish a worker task over NATS.
BEM-098500The worker reply payload is not valid JSON.
BEM-099500The worker reply envelope is missing a result or a structured error.
BEM-100500The worker error payload is not a structured Riverbase error.
BEM-101500The stream transport failed to connect to NATS.
BEM-102500The stream transport failed to subscribe to a NATS channel.
BEM-103500Failed to serialize a stream frame for NATS.
BEM-104500Failed to publish a stream frame to NATS.
BEM-105422Failed to publish an agent stream chunk.
BEM-106422Failed to publish the agent stream completion frame.
BEM-107422Sandbox tools require metadata.sandbox_root when no working tree is bound.
BEM-108422A required sandbox tool argument is missing.
BEM-109501The remember tool must be bound by the host memory manager.

Execution store​

BeamStore and PgBeamStore.

CodeStatusMessage
BEM-110500Failed to establish the beam store database pool.
BEM-111500Could not get a database connection to apply beam store schema.
BEM-112500Failed to apply the beam store schema.
BEM-113500Could not get a database connection for the beam store.
BEM-114500Failed to check in beam agents.
BEM-115500Failed to check in beam models.
BEM-116500Failed to ensure a beam session row.
BEM-117500Failed to update beam session activity.
BEM-118500Failed to create a beam interaction.
BEM-119500Failed to complete a beam interaction.
BEM-120500Failed to create a beam run.
BEM-121500Failed to complete a beam run.
BEM-122500Failed to save a beam message.
BEM-123500Failed to allocate the next beam message sequence.
BEM-124500Failed to create a beam action.
BEM-125500Failed to load a beam action.
BEM-126500Failed to resolve a beam action.
BEM-127500Failed to load a beam session.
BEM-128500Failed to load a beam interaction.
BEM-129500Failed to load a beam run.
BEM-130500Failed to list beam messages.
BEM-131500The in-memory beam store write lock was poisoned.
BEM-132500The in-memory beam store read lock was poisoned.

Memory​

The in-memory memory backend.

CodeStatusMessage
BEM-140500The in-memory memory backend could not load a layer because the lock was poisoned.
BEM-141500The in-memory memory backend could not append a layer because the lock was poisoned.
BEM-142500The in-memory memory backend could not forget an item because the lock was poisoned.

Knowledge store​

InMemoryVectorStore and PgVectorStore.

CodeStatusMessage
BEM-200500The in-memory knowledge store could not upsert records because the lock was poisoned.
BEM-201500The in-memory knowledge store could not query records because the lock was poisoned.
BEM-202500The in-memory knowledge store could not delete records because the lock was poisoned.
BEM-203500Failed to establish the knowledge store database pool.
BEM-204500Could not get a database connection for the knowledge store.
BEM-205500Could not get a database connection to apply knowledge schema.
BEM-206500Failed to apply the knowledge store schema.
BEM-207422A knowledge record is missing a document_id UUID.
BEM-208500Failed to upsert a knowledge document row.
BEM-209500Failed to upsert a knowledge chunk row.
BEM-210500Failed to upsert a knowledge memory row.
BEM-211500Failed to query knowledge chunks.
BEM-212500Failed to query knowledge memory rows.
BEM-213500Failed to delete a knowledge chunk by id.
BEM-214500Failed to delete knowledge chunks by document.
BEM-215500Failed to delete a knowledge memory row.

Embedders and knowledge configuration​

HTTP embedders and the knowledge factory.

CodeStatusMessage
BEM-220500The embedder returned an empty result for the query text.
BEM-221500The embedder HTTP request failed.
BEM-222500The embedder HTTP response could not be decoded.
BEM-223500The embedder HTTP request returned an error status.
BEM-224500The embedder response is missing the data array.
BEM-225500The embedder response is missing an embedding array.
BEM-226500An embedding vector width does not match the configured dimension.
BEM-227500The embedder returned a different number of embeddings than requested.
BEM-230422Knowledge ingest produced no chunks.
BEM-231500An HTTP embedder was requested without an API key.
BEM-232500HashEmbedder cannot write into a pgvector store.
BEM-233500The embedder dimension does not match KNOWLEDGE_EMBEDDING_DIM.
BEM-234500pgvector knowledge storage requires a 1536-dimension embedding.

Sandbox and git​

SandboxRoot paths and WorkingTree git operations.

CodeStatusMessage
BEM-300400The sandbox path is absolute, contains NUL, or uses a forbidden separator.
BEM-301400The sandbox path contains a parent-directory component.
BEM-302400The resolved sandbox path escapes the jail.
BEM-303400The sandbox parent path escapes the jail.
BEM-304400The sandbox path is missing a file name.
BEM-305400The joined sandbox path is not under the jail root.
BEM-306400The sandbox path is not a directory.
BEM-307500Failed to read a file inside the sandbox.
BEM-308400Creating the sandbox write parent escaped the jail.
BEM-309400A listed sandbox path could not be stripped to a jail-relative path.
BEM-310500Failed to create the sandbox root directory.
BEM-311500Failed to canonicalize the sandbox root.
BEM-312500Failed to canonicalize an existing sandbox path.
BEM-313500Failed to canonicalize a sandbox parent path.
BEM-314500Failed to create directories while writing a sandbox file.
BEM-315500Failed to canonicalize a sandbox write parent.
BEM-316500Failed to write a file inside the sandbox.
BEM-317500Failed to read a sandbox directory entry.
BEM-318500Failed to read a sandbox directory listing.
BEM-320500Failed to initialize a git repository in the sandbox.
BEM-321500Failed to open the sandbox git repository.
BEM-322500Failed to read git status in the sandbox.
BEM-323500Failed to compute a git diff in the sandbox.
BEM-324500Failed to read the git log in the sandbox.
BEM-325500Failed to stage files in the sandbox git repository.
BEM-326500Failed to create a git commit in the sandbox.
BEM-327500Failed to read the current git branch in the sandbox.
BEM-328403Pushing a protected git ref is not allowed.
BEM-329500The sandbox git repository has no origin remote.
BEM-330500Failed to push a git ref from the sandbox.
BEM-331500Failed to add or update the sandbox git origin remote.
BEM-332500Failed to check out a git branch in the sandbox.

Audio​

Audio decoding, speech-to-text, and the audio turn.

CodeStatusMessage
BEM-350400The audio bytes are missing a RIFF/WAVE header.
BEM-351400The WAV payload has no data chunk.
BEM-352422WebM or MP4 decode requires a host decoder; fixture tests use WAV.
BEM-353422The audio container is not supported.
BEM-354422The audio turn received empty audio bytes.
BEM-355500HTTP speech-to-text requires a base URL.
BEM-356500Failed to build the speech-to-text multipart body.
BEM-357500The speech-to-text HTTP request failed.
BEM-358500The speech-to-text HTTP response could not be decoded.
BEM-359500The speech-to-text HTTP request returned an error status.
BEM-360500The audio turn failed to invoke the agent.

BEM-064 and BEM-065 are declared but not raised yet, and BEM-062 cannot occur through invoke. See Sessions and human approval.