From 0ce69a82cdcb5531531ad41171c9f5b0cc4a0b2d Mon Sep 17 00:00:00 2001 From: Andreas Olsson Date: Sat, 30 Mar 2024 11:33:57 +0100 Subject: [PATCH] WIP: final multi-line approach? --- vault_oidc_ssh_cert_action.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vault_oidc_ssh_cert_action.py b/vault_oidc_ssh_cert_action.py index a09e178..eb7437a 100644 --- a/vault_oidc_ssh_cert_action.py +++ b/vault_oidc_ssh_cert_action.py @@ -45,6 +45,11 @@ def _issue_vault_token( response = requests.post(login_url, data=payload, timeout=10) response.raise_for_status() except requests.exceptions.HTTPError as http_error: + error_message = str(http_error) + if http_error.response is not None: + error_message += "\nHTTP error contained the following output:\n" + error_message += http_error.response.text + error_message += "\n" _set_error_message("Vault login error", str(http_error)) raise VoscaError from http_error