5
0
Fork 0
mirror of https://github.com/hashicorp/vault-action.git synced 2025-11-08 15:46:56 +00:00

initial test

This commit is contained in:
Kevin Schoonover 2023-01-16 14:24:00 -08:00
parent 8fa61e9099
commit aa71f3a8d9

View file

@ -109,7 +109,13 @@ async function getClientToken(client, method, path, payload) {
core.debug(`Retrieving Vault Token from v1/auth/${path}/login endpoint`);
/** @type {import('got').Response<VaultLoginResponse>} */
const response = await client.post(`v1/auth/${path}/login`, options);
let response;
try {
response = await client.post(`v1/auth/${path}/login`, options);
} catch (error) {
core.debug(JSON.stringify(error))
core.error(error)
}
if (response && response.body && response.body.auth && response.body.auth.client_token) {
core.debug('✔ Vault Token successfully retrieved');