Skip to content

Handle consolidation errors raised during manager creation - #802

Open
cyc60 wants to merge 1 commit into
masterfrom
fix-consolidation-create-error-handling
Open

Handle consolidation errors raised during manager creation#802
cyc60 wants to merge 1 commit into
masterfrom
fix-consolidation-create-error-handling

Conversation

@cyc60

@cyc60 cyc60 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

In process() only get_target_source() was wrapped in try/except ConsolidationError; the ConsolidationManager.create(...) call above it was not. A ConsolidationError raised during manager creation (e.g. Cannot determine balance for source validator index ... in pending consolidation) escaped to the generic exception handler in consolidate(), producing a verbose log line and bare exit code 1 instead of the clean Error: ... message every other validation error in this flow produces.

The try block now covers manager creation as well, so all ConsolidationErrors surface as a clean ClickException.

Note: src/validators/commands/tests/test_consolidate.py is also created by #801; whichever merges second will need a trivial test-file merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant