Skip to content

Commit

Permalink
WIP: more geneic request excepton
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent 5c8948f commit d41ccbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def _issue_vault_token(
try:
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))
raise VoscaError from http_error
except requests.exceptions.RequestException as request_error:
_set_error_message("Vault login error", str(request_error))
raise VoscaError from request_error

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

0 comments on commit d41ccbf

Please sign in to comment.