Skip to content

API Reference parrot.knowledge.ontology.exceptions

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.ontology.exceptions

View source

Custom exceptions for the Ontological Graph RAG system.

Class AQLValidationError

Raised when LLM-generated AQL fails safety validation.

Class CycleError

Raised when an is_a edge would create a cycle in the concept DAG.

Cycle detection runs on every propose_isa_edge and approve call. The cycle path is stored for debugging.

Parameter Type Default Description
message str Human-readable error description.
cycle_path list[str] | None None Ordered list of node IDs/names forming the cycle.

Attributes:

Attribute Type Description
cycle_path list[str]

Class DataSourceValidationError

Raised by ExtractDataSource.validate() when the source schema doesn't match.

Class DryRunFailedError

Raised when a schema overlay dry-run fails validation.

The dry-run report is stored so callers can surface check details to users.

Parameter Type Default Description
message str Human-readable error description.
report object | None None The DryRunReport (or a plain dict) describing what failed.

Class FrameworkOverrideError

Raised when an overlay attempts to mutate a framework entity, relation, or pattern.

Framework items (those in base.ontology.yaml) are immutable at runtime. No UI path or PG overlay may redefine them.

Parameter Type Default Description
message str Human-readable error description.
entity_name str | None None Name of the framework entity/relation/pattern that was targeted.

Class InvalidTransitionError

Raised when a state-machine transition is not permitted.

Parameter Type Default Description
message str Human-readable error description.
current_state str | None None The current state of the entity.
requested_action str | None None The action that was attempted.

Class OntologyError

Base exception for all ontology-related errors.

Class OntologyIntegrityError

Raised during post-merge integrity validation.

Class OntologyMergeError

Raised during YAML merge when rules are violated.

Class QueryDialectMismatch

Raised when a query dialect differs from the selected store dialect.

Class QueryValidationError

Dynamic query rejected because its dialect is unsafe or unsupported.

Class SynonymConflictError

Raised when a synonym conflicts with an existing approved concept synonym.

Synonym uniqueness is enforced within a tenant's approved concepts.

Parameter Type Default Description
message str Human-readable error description.
synonym str | None None The conflicting synonym string.
existing_slug str | None None Slug of the concept that already owns the synonym.

Class TraversalPatternUnavailable

Raised when a traversal pattern has no template for the store dialect.

Class UnknownDataSourceError

Raised by DataSourceFactory when a source name cannot be resolved.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally