Skip to content

Exceptions

smrititantra.exceptions

The typed exception hierarchy.

Every error the package raises derives from :class:SmrititantraError. Each class carries http_status so the HTTP layer's error mapping is defined once, here, and the remote SDK can re-raise the exact type from an error body's class name.

AuthError

Bases: SmrititantraError

Missing, unknown, or revoked credentials.

BindingVerificationError

Bases: SmrititantraError

A binding's expression failed executable verification.

ConfigError

Bases: SmrititantraError

Bad deployment settings or an invalid tenant config.

EmbedderNotConfiguredError

Bases: SmrititantraError

An embedding-dependent path was forced without SMRITITANTRA_EMBED_URL/_MODEL set.

ExecutionRejected(message: str, reason: str = 'policy')

Bases: SmrititantraError

The execution edge refused a query (write keyword, unknown table, masked column, policy violation, or unparseable SQL). reason is a stable class the agent can use for one mechanical repair attempt.

ExecutionTimeout

Bases: SmrititantraError

The source system did not answer within the statement timeout.

ExtraNotInstalledError(extra: str, capability: str)

Bases: SmrititantraError

A capability was used whose optional dependency layer is not installed.

GapCooldownError

Bases: SmrititantraError

This gap is cooling down for this principal; do not re-ask yet.

GapNotFoundError

Bases: NotFoundError

The referenced knowledge gap does not exist (or is not visible).

GraphTierNotDeployedError()

Bases: SmrititantraError

graph.query / impact / lineage require the graph serving tier.

There is exactly one implementation of the graph surfaces (on the tier); without it they fail fast with this error and its remedy — recall, learning, and execution are unaffected.

LLMNotConfiguredError

Bases: SmrititantraError

An LLM-dependent pipeline was invoked without SMRITITANTRA_LLM_URL/_MODEL set.

LimitExceeded(message: str, *, retry_after: int | None = None)

Bases: SmrititantraError

A quota or rate limit was hit.

MigrationError

Bases: StoreError

A schema migration could not be applied.

NotFoundError

Bases: SmrititantraError

The referenced thing does not exist (within the caller's visibility).

RecallDegradedError

Bases: SmrititantraError

Raised only in strict verify mode when deterministic post-checks fail.

ScopeError

Bases: SmrititantraError

The principal lacks rights for this resource or verb.

Deliberately 404-shaped for reads so callers cannot enumerate what exists beyond their clearance; write denials surface as 403 at the route layer.

SmrititantraError

Bases: Exception

Base class for every smrititantra error.

SnapshotError

Bases: SmrititantraError

A compiled-snapshot problem.

SnapshotGateFailed

Bases: SnapshotError

The replay gate refused to publish a snapshot that regressed the golden set.

SnapshotUnavailableError

Bases: SnapshotError

No published snapshot yet — compile and publish one first.

StoreError

Bases: SmrititantraError

A storage-layer failure.

StoreUnavailableError

Bases: StoreError

The store is unreachable. Writes fail closed; nothing serves stale rows.

ValidationFailed(message: str, errors: list[dict[str, str]] | None = None)

Bases: SmrititantraError

Content, manifest, or request payload failed validation.

errors carries structured findings: [{location, reason}].