From bdbfa1b3f00e5d3d2079ce60a1e963f05d06db8e Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Thu, 16 Nov 2023 14:21:05 -0700 Subject: [PATCH] fix: add the original error stack to the new error (#862) * fix: add the original error stack to the new error * fix: add a caused by error --- src/commands/org/login/web.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/org/login/web.ts b/src/commands/org/login/web.ts index 090bc9a2..adf0ccdc 100644 --- a/src/commands/org/login/web.ts +++ b/src/commands/org/login/web.ts @@ -116,9 +116,9 @@ export default class LoginWeb extends AuthBaseCommand { return fields; } catch (err) { const error = err as Error; - Logger.childFromRoot('auth').debug(error); + Logger.childFromRoot('LoginWebCommand').debug(error); if (error.name === 'AuthCodeExchangeError') { - throw new SfError(messages.getMessage('invalidClientId', [error.message])); + throw new SfError(messages.getMessage('invalidClientId', [error.message]), undefined, undefined, error); } throw error; }