From bfe0bd05caea505ac99a5a68cf66aa563cf88d00 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 15 Sep 2025 12:33:06 +0200 Subject: [PATCH] chore: preserve cause of the error when reading token --- src/utils/process.utils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/process.utils.ts b/src/utils/process.utils.ts index d4232fc1..627f6feb 100644 --- a/src/utils/process.utils.ts +++ b/src/utils/process.utils.ts @@ -12,8 +12,10 @@ export const getProcessToken = (): JsonnableEd25519KeyIdentity | undefined => { const {token} = JSON.parse(atob(envToken)); // eslint-disable-next-line @typescript-eslint/no-unsafe-return return token; - } catch (_err: unknown) { - throw new Error('Cannot parse token provided as an environment variable.'); + } catch (err: unknown) { + throw new Error('Cannot parse token provided as an environment variable.', { + cause: err + }); } };