Skip to content

catch config errors in run command instead of crashing - #6

Merged
OneNobleSoul merged 1 commit into
mainfrom
fix/cmd-run-config-error
Jul 17, 2026
Merged

catch config errors in run command instead of crashing#6
OneNobleSoul merged 1 commit into
mainfrom
fix/cmd-run-config-error

Conversation

@OneNobleSoul

Copy link
Copy Markdown
Owner

cmd_check and cmd_send already catch ConfigError from load_config and print a clean config error: ... message to stderr. cmd_run did not, so a missing or malformed config file at hookrelay run -c ... (the way this normally gets started, e.g. via systemd) crashed with a raw traceback instead. Fixed to match the other two subcommands, plus tests/test_cli.py which did not exist before.

cmd_check and cmd_send already wrap load_config in try/except and
print a clean 'config error: ...' message, but cmd_run called
load_config directly. a missing or malformed config file at
'hookrelay run -c ...' time (the normal way this thing gets started,
e.g. from systemd) blew up with a raw ConfigError traceback instead
of the same clean stderr message the other subcommands give.
@OneNobleSoul
OneNobleSoul merged commit a4a51d4 into main Jul 17, 2026
3 checks passed
@OneNobleSoul
OneNobleSoul deleted the fix/cmd-run-config-error branch July 17, 2026 04:05
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