You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: [#83] unify error kind classification with generic ErrorKind enum
Replace command-specific error kinds (ProvisionErrorKind, ConfigureErrorKind)
with a single generic ErrorKind enum that provides high-level error
categorization across all commands.
This refactor simplifies error handling by making errors self-describing
through the Traceable trait's error_kind() method, eliminating the need for
manual error classification in command code.
Changes:
- Add generic ErrorKind enum with 7 variants (TemplateRendering,
InfrastructureOperation, NetworkConnectivity, CommandExecution, Timeout,
FileSystem, Configuration)
- Extend Traceable trait with error_kind() method
- Implement error_kind() for all error types (9 main + 3 test types)
- Update ProvisionFailureContext and ConfigureFailureContext to use ErrorKind
- Update commands to call error.error_kind() instead of manual pattern matching
- Remove old ProvisionErrorKind and ConfigureErrorKind enums
- Update all tests and trace writers to use new error kind system
Benefits:
- Single source of truth for error categorization
- Errors are self-describing via error_kind() method
- No manual error classification needed in commands
- Consistent error kinds across all commands
- Easier to extend with new error types
All tests passing (758), all linters passing.
0 commit comments