Skip to content

Commit

Permalink
Added extra error messages and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nmassey001 committed Jan 15, 2025
1 parent abdd55a commit fffc312
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions nlds_client/clientlib/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def main_loop(
except requests.exceptions.ConnectionError as e:
raise ConnectionError(
f"Could not connect to the URL: {url}\n"
f"Reason {e}\n"
"Check the ['server']['url'] and ['server']['api'] setting in "
f"the {CONFIG_FILE_LOCATION} file."
)
Expand Down
4 changes: 2 additions & 2 deletions nlds_client/nlds_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def print_multi_stat(response: dict, req_details):
stat_string += req_details
click.echo(stat_string)
click.echo(
f"{'':<4}{'user':<16}{'id':<6}{'action':<16}{'job label':<16}"
f"{'':<4}{'user':<16}{'id':<12}{'action':<16}{'job label':<16}"
f"{'label':<16}{'state':<23}{'last update':<20}"
)
for tr in response["data"]["records"]:
Expand All @@ -245,7 +245,7 @@ def print_multi_stat(response: dict, req_details):
else:
job_label = "" # tr['transaction_id'][0:8]
click.echo(
f"{'':<4}{tr['user']:<16}{tr['id']:<6}{tr['api_action']:<16}"
f"{'':<4}{tr['user']:<16}{tr['id']:<12}{tr['api_action']:<16}"
f"{job_label:16}{label:16}"
f"{state:<23}{time:<20}"
)
Expand Down

0 comments on commit fffc312

Please sign in to comment.