Attempted to improve error output and visibility
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 30s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 30s
This commit is contained in:
parent
4158ed1d35
commit
89e3d16f6c
1 changed files with 7 additions and 1 deletions
|
|
@ -336,7 +336,13 @@ export class OAuthApp<TCustomClaims extends BridgemanAccessibleAppClaims, TScope
|
|||
catch(err) {
|
||||
logMessage('Error setting up the BA User Auth', LogLevel.ERROR);
|
||||
logMessage('---------------------------------', LogLevel.ERROR);
|
||||
logMessage(JSON.stringify(err), LogLevel.ERROR);
|
||||
if(err instanceof Error) {
|
||||
logMessage(`Error Message: ${err.message}`, LogLevel.ERROR);
|
||||
logMessage(`Stack Trace:\n${err.stack}` || 'Stack Trace Not Available', LogLevel.ERROR);
|
||||
}
|
||||
else {
|
||||
logMessage(`Unknown format error (attempting to stringify): ${JSON.stringify(err)}`, LogLevel.ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue