Skip to content

v4: Add custom exception hierarchy #219

@jtdub

Description

@jtdub

Description

Currently only DuplicateChildError exists as a custom exception. All other errors use generic ValueError or TypeError, making it difficult for users to catch specific failure modes.

Proposed Change

Add a proper exception hierarchy:

HierConfigError (base)
├── DriverNotFoundError       (replaces ValueError in get_hconfig_driver)
├── InvalidConfigError        (for malformed config text)
├── DuplicateChildError       (already exists, reparent under HierConfigError)
└── IncompatibleDriverError   (for WorkflowRemediation with mismatched drivers)

Breaking Change

Yes — DuplicateChildError moves under HierConfigError, and code catching ValueError from get_hconfig_driver() would need updating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v4-enhancementEnhancement planned for hier_config v4.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions