Skip to content

Commit

Permalink
fix: add the original error stack to the new error (#862)
Browse files Browse the repository at this point in the history
* fix: add the original error stack to the new error

* fix: add a caused by error
  • Loading branch information
shetzel authored Nov 16, 2023
1 parent 710c59b commit bdbfa1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/org/login/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ export default class LoginWeb extends AuthBaseCommand<AuthFields> {
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;
}
Expand Down

0 comments on commit bdbfa1b

Please sign in to comment.