From e47faaa86bfd03d3672b5cdfd180f511cf953077 Mon Sep 17 00:00:00 2001 From: Christopher Swenson Date: Wed, 20 Apr 2022 13:35:10 -0700 Subject: [PATCH] Address additional comments on #182 --- integrationTests/basic/integration.test.js | 2 +- src/secrets.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrationTests/basic/integration.test.js b/integrationTests/basic/integration.test.js index fac5e55..d879142 100644 --- a/integrationTests/basic/integration.test.js +++ b/integrationTests/basic/integration.test.js @@ -128,7 +128,7 @@ describe('integration', () => { secret/data/test secret | NAMED_SECRET ; secret/data/notFound kehe | NO_SIR ;`); - expect(exportSecrets()).rejects.toEqual(Error(`Unable to retrieve result for "secret/data/notFound". Double check your Key.`)); + expect(exportSecrets()).rejects.toEqual(Error(`Unable to retrieve result for "secret/data/notFound" because it was not found: {"errors":[]}`)); }) it('get simple secret', async () => { diff --git a/src/secrets.js b/src/secrets.js index c0c1f12..3834f6d 100644 --- a/src/secrets.js +++ b/src/secrets.js @@ -41,7 +41,7 @@ async function getSecrets(secretRequests, client) { } catch (error) { const {response} = error; if (response.statusCode === 404) { - throw Error(`Unable to retrieve result for "${path}". Double check your Key.`) + throw Error(`Unable to retrieve result for "${path}" because it was not found: ${response.body.trim()}`) } throw error }