Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
Control APIs

Errors

HTTP status codes, error types, and structured error payloads returned by the MuBit control API.

Every error response carries a flat JSON body with a single human-readable error string:

{
  "error": "ingest request exceeds the 1000-item limit"
}

There is no nested type/code envelope and no request_id field on the response body. Map programmatically on the HTTP status code (below) or, over gRPC, on the canonical status code. The HTTP API is a thin shell over the gRPC service, so every HTTP status is derived from a gRPC code.

Status codes

StatusgRPC codeMeaningRetryable?
400InvalidArgumentRequest shape rejected — missing/invalid field, or an input cap exceeded (e.g. >1000 items)No
401UnauthenticatedMissing or invalid Authorization headerNo
403PermissionDeniedKey is valid but not scoped to this run/session/resourceNo
404NotFoundSession, agent, reference id, or job id does not existNo
409AlreadyExistsA unique resource (project, agent, skill, …) already existsNo
410Endpoint was removed (legacy core SDM lanes); use insert/search insteadNo
429ResourceExhaustedAn upstream dependency (e.g. an LLM provider) is throttlingYes (with backoff)
500Internal (and unmapped)Unhandled server errorYes (with backoff)
503Unavailable / FailedPreconditionBackend temporarily unavailable or a precondition is not yet metYes (with backoff)
ℹ️Note

The runtime does not currently emit 422, 499, 502, or 504. Business-rule rejections surface as 400 (InvalidArgument); overload and unmet preconditions surface as 503. See Rate limits for what is and isn't throttled.

SDK exception mapping

The Python SDK raises typed exceptions exported from the top-level mubit package (there is no mubit.errors submodule):

ExceptionRaised for
mubit.AuthError401 — bad, missing, or revoked key
mubit.ValidationError400 — wrong request shape or a rejected business rule
mubit.AlreadyExistsError409 — duplicate unique resource (subclass of ValidationError)
mubit.UnsupportedFeatureErrorA call the current server/transport doesn't support
mubit.ServerError5xx — server-side failure (retryable)
mubit.TransportErrorNetwork/transport failure; carries a .code (e.g. UNAVAILABLE, DEADLINE_EXCEEDED)
import mubit
 
client = mubit.Client()
try:
    client.remember(session_id=run_id, agent_id="support-agent", content="…", intent="fact")
except mubit.AuthError:
    raise                         # fix the API key — don't retry
except mubit.ValidationError:
    raise                         # fix the call shape — don't retry
except (mubit.ServerError, mubit.TransportError):
    ...                           # transient — safe to retry (see below)

ServerError and transient TransportErrors are the retryable cases; auth, validation, and unsupported-feature errors are not. The SDK already retries the transient ones for you — see Retries and idempotency for the policy and the manual pattern.