aeat.application.workflow._errors module¶
Exception hierarchy for application.workflow.
All workflow errors inherit from core.errors.AeatError per
the project-wide error-hierarchy rule. The engine’s default path never
raises WorkflowAbortedError: aborts are first-class outcomes
encoded in the returned
application.workflow.WorkflowResult. Callers who want
exception-on-abort behaviour opt in by inspecting the result themselves.
- exception WorkflowError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase exception for all
application.workflowfailures.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception WorkflowComponentError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised when a cross-module component raises an unexpected exception.
The engine catches every exception raised by an injected Protocol component, wraps it in a
WorkflowComponentError, records the context on the surroundingapplication.workflow.WorkflowStep, and lets the workflow abort withapplication.workflow.WorkflowAbortReason.UNHANDLED_EXCEPTION.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception WorkflowAbortedError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised only when a caller explicitly opts in to exception-on-abort.
The default driver path returns a populated
application.workflow.WorkflowResultwhoseaborted_reasonis set. This exception is reserved for callers that prefer raising over inspecting (e.g. a future cron runner that wants a non-zero exit).- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception BootstrapAlreadyCompleteError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised when aeat config profile create NAME is re-invoked after a profile already exists.
The bootstrap wizard is a one-shot first-run flow. A second invocation must refuse with this typed error so the operator is redirected to the canonical second-or-later-profile creation path (the
aeat config profile create NAMEverb) rather than silently overwriting the existing default profile.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ProfileNameCollisionError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised when an operator-typed profile NAME is already in use.
Fired by the lifecycle service’s create and rename paths when the requested NAME already names a live or tombstoned profile. The error payload carries the colliding name so the CLI can render it back to the operator without a second repository round trip.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ProfileLockedError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised when a profile-scoped operation requires an unlocked profile session.
The profile-bucket lifecycle mandates explicit unlock-on-switch semantics: a verb that needs the active profile’s plaintext payload must run inside an unlocked
BucketSession. Verbs that touch encrypted payloads on a locked-default state refuse with this typed error so the operator runs the unlock flow explicitly.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception UnhandledWorkflowError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowComponentErrorRaised when a workflow stage propagates an exception with no typed handler.
Wraps every bare
except Exceptioncatch insideaeat.application.workflow._engine.WorkflowEngine._record_unhandledso the unhandled path produces a structuredErrorEnvelopewith a stableINTERNAL_WORKFLOW_UNHANDLEDcode rather than an opaqueUNHANDLED_EXCEPTIONabort reason alone.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception ProfileLabelAmbiguousError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
WorkflowErrorRaised when a profile label resolves to more than one live bucket.
The name-uniqueness guard should prevent this among live profiles. When it occurs, the operator must disambiguate by UUID rather than by label. Carries the label and the ambiguous match count so the CLI can render a diagnostic without a second repository round trip.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception WorkflowInputMismatchError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
CoreValidationErrorRaised when a workflow input request does not match the expected contract.
Used both by the engine’s
run_for_periodgate (malformedresumed_fromrun id shape) and byapplication.modelo._workflow_gate._RevisionInputsProvider(modelo code or period mismatch against the baked revision). Any deviation signals a programming error or a stale work-unit reference and must be rejected before inputs reach the engine.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception WorkflowAbortSignalError(*, reason, summary)[source]¶
Bases:
WorkflowErrorInternal control-flow signal raised by stage methods to bail out.
Named
WorkflowAbortSignalErrorbecause it subclassesWorkflowErrorand the project-wide naming convention requires theErrorsuffix on all exception classes. The engine treats it as an internal control-flow vehicle — it never propagates outsideapplication.workflow.WorkflowEngine.WorkflowEngine._drivealways catches it and materialises theapplication.workflow.WorkflowResult. SubclassesWorkflowErrorso the project-wide error-hierarchy rule still holds and the registry can bind a stableINTERNAL_WORKFLOW_ABORT_SIGNALcode for telemetry.- Variables:
reason – The
WorkflowAbortReasonthat classifies the bailout.summary – Human-readable
strsummary surfaced on the resultingWorkflowResult.
- Parameters:
reason (WorkflowAbortReason)
summary (str)
- Return type:
None
- code: ClassVar[ErrorCode]¶