Skip to content

Comments

[HDX-8033] Centralize error handling and debugging#62

Open
agustinhydrolix wants to merge 1 commit intodevfrom
fix/HDX-8033-simplify-error-handling
Open

[HDX-8033] Centralize error handling and debugging#62
agustinhydrolix wants to merge 1 commit intodevfrom
fix/HDX-8033-simplify-error-handling

Conversation

@agustinhydrolix
Copy link
Contributor

This PR refactors the CLI's error and exception handling mechanism to improve the developer experience and centralize logic.

Previously, error handling was managed by a repetitive @report_error_and_exit decorator applied to all commands. This approach made debugging difficult, as it caught exceptions prematurely and hid the full traceback from the developer.

This change introduces a centralized handler in a custom HdxCliGroup class. This class now intercepts all runtime exceptions, providing consistent user-facing error messages while allowing the global --debug flag to reveal the full stack trace for unexpected errors.

@agustinhydrolix agustinhydrolix self-assigned this Sep 29, 2025
@agustinhydrolix agustinhydrolix changed the title Centralize error handling and debugging [HDX-8033] Centralize error handling and debugging Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants