pydantable.errors¶
User-facing exceptions for validation, ingest, and engine contracts.
pydantable.errors
¶
User-facing errors for schema and ingest contracts.
Most exceptions subclass :exc:ValueError (or :exc:PydantableUserError, which is a
:class:ValueError subclass) so broad handlers in application code keep working.
Prefer catching specific types in new code and map them to HTTP status codes in APIs
(e.g. :exc:ColumnLengthMismatchError → 400 with FastAPI helpers).
PydantableUserError
¶
Bases: ValueError
Base class for predictable validation and contract failures.
Subclasses :exc:ValueError so except ValueError still matches; use this
base or a concrete subclass when you need to distinguish pydantable errors from
other :exc:ValueError sources.
Source code in python/pydantable/errors.py
ColumnLengthMismatchError
¶
Bases: PydantableUserError
Raised when per-column list lengths disagree for a rectangular table mapping.
Typical cause: constructing a dict[str, list] or equivalent where one column
has a different row count than the others.
Source code in python/pydantable/errors.py
MissingOptionalDependency
¶
Bases: PydantableUserError
Raised when an optional dependency is required for the requested API.
Install the matching extra (for example pip install 'pydantable[sql]').
UnsupportedEngineOperationError
¶
Bases: PydantableUserError, UnsupportedEngineOperationError
Raised when the active execution engine cannot perform a requested operation.
Inherits from
:class:pydantable_protocol.exceptions.UnsupportedEngineOperationError so
isinstance(exc, pydantable_protocol.UnsupportedEngineOperationError)
matches errors raised by pydantable and by third-party engines.
Source code in python/pydantable/errors.py
unsupported_engine_operation
¶
Build a consistent UnsupportedEngineOperationError message.
Use this when an operation is unsupported due to engine capabilities or missing optional runtime components.