Skip to content

Commit

Permalink
fix: add a caused by error
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Nov 16, 2023
1 parent 0cf2ef7 commit 267aa49
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/commands/org/login/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,7 @@ export default class LoginWeb extends AuthBaseCommand<AuthFields> {
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;
}
Expand Down

0 comments on commit 267aa49

Please sign in to comment.