Skip to content
Snippets Groups Projects
Commit d12985f0 authored by Urs Baumann's avatar Urs Baumann :bath:
Browse files

Add error msg print

parent 6c52b7c9
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,11 @@ def upload_file(
)
except httpx.HTTPError as exc:
print(f"[red bold]{exc}[/]", file=sys.stderr)
try:
print(f"[red]Error: {exc.response.json().get('error')}[/]", file=sys.stderr)
print(f"[red]Message: {exc.response.json().get('msg')}[/]", file=sys.stderr)
except:
pass
typer.Exit(code=1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment