diff --git a/vault_oidc_ssh_cert_action.py b/vault_oidc_ssh_cert_action.py index 5a51edc..ddfd423 100644 --- a/vault_oidc_ssh_cert_action.py +++ b/vault_oidc_ssh_cert_action.py @@ -6,6 +6,10 @@ import requests +class VoscaError(Exception): + pass + + def _determine_audience(input_audience: str, vault_server: str) -> str: if input_audience: return input_audience @@ -69,7 +73,7 @@ def github_vault_auth() -> None: ) except requests.exceptions.HTTPError as http_error: print(http_error.response.json()) - raise SystemExit(1) from http_error + raise VoscaError from http_error print(f"::add-mask::{vault_token}") with open(os.environ["GITHUB_OUTPUT"], mode="a", encoding="utf-8") as ghof: