luplo.core.errors¶
Domain error hierarchy — one module for every caller-facing exception.
Every error carries an http_status hint so the FastAPI layer can
translate them with one mapping. CLI/MCP layers turn them into exit codes
or text responses.
Sibling modules (e.g. item_types, tasks, qa) import the bases
from here and raise specific subclasses, so callers can except
errors.LuploDomainError once and catch them all.
Exceptions¶
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Raised when create_item references an item_type not in the registry. |
|
Raised when items.context fails its registered JSON Schema. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Raised when removing a canonical term while alias terms remain. |
|
Base class for all luplo domain errors. Carries an HTTP status hint. |
|
Raised when a UUID prefix is shorter than the minimum length. |
|
Raised when an ID is neither a full UUID nor a valid hex prefix. |
|
Raised when a UUID prefix matches more than one row. |
Module Contents¶
- exception luplo.core.errors.LuploDomainError(message: str)¶
Bases:
ExceptionBase class for all luplo domain errors. Carries an HTTP status hint.
- message¶
- exception luplo.core.errors.NotFoundError(message: str)¶
Bases:
LuploDomainErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- exception luplo.core.errors.ConflictError(message: str)¶
Bases:
LuploDomainErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- exception luplo.core.errors.ValidationError(message: str)¶
Bases:
LuploDomainErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- exception luplo.core.errors.AuthError(message: str)¶
Bases:
LuploDomainErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- exception luplo.core.errors.UnknownItemTypeError(item_type: str)¶
Bases:
ValidationErrorRaised when create_item references an item_type not in the registry.
- item_type¶
- exception luplo.core.errors.ContextValidationError(item_type: str, message: str)¶
Bases:
ValidationErrorRaised when items.context fails its registered JSON Schema.
- item_type¶
- exception luplo.core.errors.TaskNotFoundError(task_id: str)¶
Bases:
NotFoundErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- task_id¶
- exception luplo.core.errors.TaskAlreadyInProgressError(work_unit_id: str, task_id: str)¶
Bases:
ConflictErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- work_unit_id¶
- in_progress_task_id¶
- exception luplo.core.errors.TaskStateTransitionError(task_id: str, from_status: str, to_status: str)¶
Bases:
ConflictErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- task_id¶
- from_status¶
- to_status¶
- exception luplo.core.errors.QACheckNotFoundError(qa_id: str)¶
Bases:
NotFoundErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- qa_id¶
- exception luplo.core.errors.QAStateTransitionError(qa_id: str, from_status: str, to_status: str)¶
Bases:
ConflictErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- qa_id¶
- from_status¶
- to_status¶
- exception luplo.core.errors.GlossaryGroupHasActiveTermsError(group_id: str, term_id: str)¶
Bases:
ConflictErrorRaised when removing a canonical term while alias terms remain.
Cascade-delete (option B) only fires when the canonical is the last active term in the group. If aliases remain the caller must promote one to canonical or remove them first.
- group_id¶
- term_id¶
- exception luplo.core.errors.WorkUnitHasActiveTasksError(work_unit_id: str, in_progress_task_id: str)¶
Bases:
ConflictErrorBase class for all luplo domain errors. Carries an HTTP status hint.
- work_unit_id¶
- in_progress_task_id¶
- exception luplo.core.errors.IdTooShortError(prefix: str, min_length: int)¶
Bases:
ValidationErrorRaised when a UUID prefix is shorter than the minimum length.
- prefix¶
- min_length¶
- exception luplo.core.errors.InvalidIdFormatError(value: str)¶
Bases:
ValidationErrorRaised when an ID is neither a full UUID nor a valid hex prefix.
- value¶
- exception luplo.core.errors.AmbiguousIdError(prefix: str, matches: list[tuple[str, str]])¶
Bases:
ConflictErrorRaised when a UUID prefix matches more than one row.
Carries up to two sample matches so callers can show the user enough to disambiguate without leaking the entire result set.
- prefix¶
- matches¶