Skip to content

Preserve AttributeError exceptions from CLI commands - #1444

Draft
YT-er wants to merge 1 commit into
griffithlab:8.0.0from
YT-er:codex/preserve-cli-attribute-errors
Draft

Preserve AttributeError exceptions from CLI commands#1444
YT-er wants to merge 1 commit into
griffithlab:8.0.0from
YT-er:codex/preserve-cli-attribute-errors

Conversation

@YT-er

@YT-er YT-er commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect a missing CLI subcommand before dispatch
  • allow AttributeError raised by a selected command to propagate unchanged
  • cover both behaviors across the top-level CLI and all product CLIs

Why

The broad AttributeError handler currently treats command implementation failures as if no command was provided. This masks the real exception and replaces it with generic help output.

Impact

Invocations without a command retain the current help and exit behavior. Runtime AttributeError exceptions from commands are no longer hidden.

Validation

  • python -m unittest tests.test_cli_error_handling — 2 tests passed with all seven CLIs exercised as subtests
  • Python compile check passed for the changed CLI modules and test
  • git diff --check passed

This is one focused replacement for part of #1430 and is based on 8.0.0.

AI assistance disclosure

This PR was AI-assisted using OpenAI Codex for implementation, test drafting, and command execution. I reviewed the diff line by line, ran the validation above, and take responsibility for the submitted changes.

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