Skip to content

Commit

Permalink
Closes #316 - 40x errors now surface correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvaughn committed Apr 23, 2021
1 parent 4a55dda commit 14d2741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tapis_cli/commands/taccapis/v2/files/helpers/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def read_tapis_http_error(http_error_object):
except Exception:
err_msg = h.response.text

httperror = 'HTTPError - {} {}; message: {}; status: {}; version: {}; response.content: {}'
httperror = '[{}] {}; message: {}; status: {}; version: {}; response.content: {}'
return httperror.format(code, reason, err_msg, status_msg, version_msg,
h.response.content)

Expand All @@ -80,4 +80,4 @@ def handle_http_error(httperror):
if httperror.response.status_code == 404:
raise HTTPNotFoundError(httperror)
else:
raise decorated_http_error
raise AgaveError(decorated_http_error)
4 changes: 2 additions & 2 deletions tapis_cli/commands/taccapis/v2/jobs/helpers/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def read_tapis_http_error(http_error_object):
except Exception:
err_msg = h.response.text

httperror = 'HTTPError - {} {}; message: {}; status: {}; version: {}; response.content: {}'
httperror = '[{}] {}; message: {}; status: {}; version: {}; response.content: {}'
return httperror.format(code, reason, err_msg, status_msg, version_msg,
h.response.content)

Expand All @@ -80,4 +80,4 @@ def handle_http_error(httperror):
if httperror.response.status_code == 404:
raise HTTPNotFoundError(httperror)
else:
raise decorated_http_error
raise AgaveError(decorated_http_error)

0 comments on commit 14d2741

Please sign in to comment.