Skip to content

Commit

Permalink
WIP: Proper exception
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaso committed Mar 30, 2024
1 parent 6a1603a commit fd69fa0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vault_oidc_ssh_cert_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit fd69fa0

Please sign in to comment.