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:
parent
8fa61e9099
commit
aa71f3a8d9
1 changed files with 7 additions and 1 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue