From aa71f3a8d9096c1b22c5c79bea28978fdefb59eb Mon Sep 17 00:00:00 2001 From: Kevin Schoonover Date: Mon, 16 Jan 2023 14:24:00 -0800 Subject: [PATCH] initial test --- src/auth.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth.js b/src/auth.js index 5e9cb20..9ba833e 100644 --- a/src/auth.js +++ b/src/auth.js @@ -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} */ - 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');