From a2ce22dd394f4a28ae38221c55f5304761a12425 Mon Sep 17 00:00:00 2001 From: Jill Regan Date: Wed, 18 Feb 2026 16:35:10 -0500 Subject: [PATCH] Add error handling --- src/utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 682fd37..7d54916 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -124,11 +124,18 @@ const loadSecretsViaServiceAccount = async ( throw new Error(authErr); } - const client = await createClient({ + // Authenticate with the 1Password SDK + let client; + try { + client = await createClient({ auth: token, integrationName: "1Password GitHub Action", integrationVersion: version, }); + } catch (err) { + const message = err instanceof Error ? err.message : String(err); + throw new Error(`Service account authentication failed: ${message}`); + } for (const envName of envs) { const ref = process.env[envName];