Skip to content

Commit

Permalink
Merge pull request #143 from omnivector-solutions/tucker/show-config-…
Browse files Browse the repository at this point in the history
…error-details-in-cli

Added detailed error output when configuration errors are encountered
  • Loading branch information
dusktreader authored Sep 22, 2022
2 parents ed6ce31 + 6ec362b commit 55b995d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions jobbergate-cli/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file keeps track of all notable changes to jobbergate-cli

Unreleased
----------
- Added error details to configuration error report

3.2.5-alpha.0 -- 2022-09-15
---------------------------
Expand Down
6 changes: 5 additions & 1 deletion jobbergate-cli/jobbergate_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@ def build_settings(*args, **kwargs):
"""
try:
return Settings(*args, **kwargs)
except ValidationError:
except ValidationError as err:
terminal_message(
conjoin(
"A configuration error was detected.",
"",
f"[yellow]Please contact [bold]{OV_CONTACT}[/bold] for support and trouble-shooting[/yellow]",
"",
"Details:",
"",
f"[red]{err}[/red]",
),
subject="Configuration Error",
)
Expand Down

0 comments on commit 55b995d

Please sign in to comment.