Skip to content

symfonic.capabilities.knowledge.errors

errors

The bridge's error taxonomy.

Four kinds, split by who is wrong, because that is what a caller needs in order to react. A contract error means the deployment declared something impossible and no input will fix it. An ingestion rejection means one input hit a guard and the next input may be fine. An extraction failure means the parser lost on one input (AS-ING-5: a typed rejection of that input, never a crash of the process). An outbound rejection means a request was refused before it left the framework.

BridgeContractError

Bases: KnowledgeBridgeError

A declaration is impossible: wrong tier, wrong layer, unusable source.

Raised at declaration time, never at render time. A deployment that declares retrieved content at an authored tier is misconfigured, and the only useful moment to say so is before the first turn.

ExtractionFailed

Bases: KnowledgeBridgeError

A parser could not read one input.

__cause__ carries the underlying library exception. Format parsers are assumed compromise-prone (AS-ING-5); their failure is a typed rejection of that input and never propagates as a raw third-party exception.

IngestionRejected

Bases: KnowledgeBridgeError

One input hit an ingestion guard: size, count, shape, or identifier.

The guard fired before the parser where the contract allows it (AS-ING-6), so this is cheap and says nothing about the payload's contents.

KnowledgeBridgeError

Bases: Exception

Base for everything this capability raises.

OutboundRejected

Bases: KnowledgeBridgeError

A request or wire payload was refused before it left the framework.

Covers the AS-NET guards (scheme allowlist, host controls) and the media-type allowlist that keeps an attacker-chosen MIME string out of a provider's own parser dispatch.