Skip to content

Commit

Permalink
WIP: Try multi-line error messag
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent a25bff4 commit 416e03b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def _issue_vault_token(
response = requests.post(login_url, data=payload, timeout=10)
response.raise_for_status()
except requests.exceptions.HTTPError as http_error:
_set_error_message("Vault login error", str(http_error))
error_message = str(http_error)
if http_error.response is not None:
error_message += f"\n{repr(http_error.response)}"
_set_error_message("Vault login error", error_message)
raise VoscaError from http_error

vault_token: str = response.json()["auth"]["client_token"]
Expand Down

0 comments on commit 416e03b

Please sign in to comment.