cadrumo.application.wizard.errors module¶
Wizard error hierarchy.
Every wizard error inherits from CadrumoError so callers can
catch the package-wide base class to handle every cadrumo domain error
uniformly. Each concrete subclass is bound to an ErrorCode
in the application error registry.
- class WizardPreconditionCondition(*values)[source]¶
Bases:
StrEnumStable terminal conditions observed by the wizard boundary.
- ACTIVE_PROFILE_AVAILABLE¶
- ACTIVE_PROFILE_TAX_ID_DECLARED¶
- FILING_BASELINE_COMPLETE¶
- REQUIRED_FLAGS_SUPPLIED¶
- PROFILE_NAME_SUPPLIED¶
- PROFILE_LABEL_AVAILABLE¶
- INTERACTIVE_CONSOLE_AVAILABLE¶
- wizard_no_action_verdict(*, condition, facts, provenance, outcome)[source]¶
Delegate one fact-only wizard terminal refusal to the public authority.
- Parameters:
condition (WizardPreconditionCondition)
provenance (ActionEvidenceProvenance)
outcome (NoRecoveryOutcome)
- exception WizardError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
TerminalPreconditionErrorMixin[PreconditionVerdict],CadrumoErrorBase class for every wizard error.
- Parameters:
- Return type:
None
- code¶
- exception WizardValidationError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
WizardError,CoreValidationErrorRaised when a widget-level validator rejects an answer.
Its registered ancestry includes
CoreValidationErrorunder the wizard error family. Pydantic field validators translate this registered failure toValueErrorat their narrow boundary.- Parameters:
- Return type:
None
- code¶
- exception WizardUnsupportedConsoleError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
WizardErrorRaised when the host terminal cannot host the interactive setup wizard.
Raised at the CLI boundary wrapping the flow substrate’s console refusal. The terminal verdict records only the failed console capability; it does not invent a follow-on command from a host limitation.
- Parameters:
- Return type:
None
- code¶
- exception WizardEditUnsupportedConsoleError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
WizardUnsupportedConsoleErrorNo-console refusal raised specifically from the
profile editflow.This subclass keeps the edit-specific registered error code while sharing the same factual terminal console-capability outcome as the base error.
- Parameters:
- Return type:
None
- code¶
- exception WizardMissingFlagError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
WizardErrorRaised when a
--quietinvocation omits a required-and-not-conditional question.- Parameters:
- Return type:
None
- code¶
- exception WizardCompileError(message=None, *, context=None, translated_message=None, precondition_verdict=None)[source]¶
Bases:
WizardErrorRaised when
compile_profile_keysrejects a malformed wizard catalogue.- Parameters:
- Return type:
None
- code¶
- exception WizardAnswerTypeError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
ProfileAnswerTypeErrorRaised when a
SetupAnswersfield coercion receives an unexpected type.Each
@field_validatorincadrumo.domain.user_profile.setup_answers’sSetupAnswersraisesProfileAnswerTypeError(the canonical core type); this subclass is retained so application-layer code and tests that catchWizardAnswerTypeErrorby name continue to work.Inherits from the registered
ProfileAnswerTypeErrorfamily, whose validation failures are translated toValueErrorat the Pydantic field-validator boundary while this typed exception remains in the error registry.- Parameters:
- Return type:
None
- code¶