From 267aa4927f8977776c13c3e0e335d24ef8765616 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Thu, 16 Nov 2023 12:09:46 -0700 Subject: [PATCH] fix: add a caused by error --- src/commands/org/login/web.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/commands/org/login/web.ts b/src/commands/org/login/web.ts index c16d90b7..adf0ccdc 100644 --- a/src/commands/org/login/web.ts +++ b/src/commands/org/login/web.ts @@ -118,11 +118,7 @@ export default class LoginWeb extends AuthBaseCommand { const error = err as Error; Logger.childFromRoot('LoginWebCommand').debug(error); if (error.name === 'AuthCodeExchangeError') { - const authError = new SfError(messages.getMessage('invalidClientId', [error.message])); - if (error.stack) { - authError.stack += `\nDUE TO:\n${error.stack}`; - } - throw authError; + throw new SfError(messages.getMessage('invalidClientId', [error.message]), undefined, undefined, error); } throw error; }