From 2a0e01171e5df9d3c9f3930f2a17ae8deb9f149c Mon Sep 17 00:00:00 2001 From: Jill Regan Date: Fri, 20 Feb 2026 09:35:27 -0500 Subject: [PATCH] Add query for vault id first --- src/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index eeea99e..583ac67 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -383,7 +383,11 @@ const loadSecretsViaConnect = async ( // Parse the op ref and get the item from the Connect SDK const parsed = parseOpRef(ref); - const item = await client.getItem(parsed.vault, parsed.item); + const vault = await client.getVault(parsed.vault); + if (!vault.id) { + throw new Error(`Vault "${parsed.vault}" has no id`); + } + const item = await client.getItem(vault.id, parsed.item); // Get the secret value from the item as Connect returns a full item object const secretValue = await getSecretFromConnectItem(client, item, parsed);