diff --git a/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js b/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js index a6bc8e94e..879b3f55b 100644 --- a/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js +++ b/packages/node_modules/@node-red/editor-api/lib/auth/strategies.js @@ -163,7 +163,9 @@ TokensStrategy.prototype.authenticate = function(req) { authenticateUserToken(req).then(user => { this.success(user,{scope:user.permissions}); }).catch(err => { - log.trace("token authentication failure: "+err.stack) + if (err) { + log.trace("token authentication failure: "+err.stack?err.stack:err) + } this.fail(401); }); }