You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PUT /api/users/155/theme 200 208.007 ms - 15
Warning: a promise was created in a handler but was not returned from it
at processImmediate as _immediateCallback
From previous event:
at [object Object].Model.findAll (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\model.js:1347:18)
at [object Object].Model.findOne (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\model.js:1519:34)
at localAuthenticate (passport.js:5:8)
at Strategy._verify (passport.js:35:12)
at Strategy.authenticate (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport-local\lib\strategy.js:90:12)
at attempt (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\authenticate.js:348:16)
at authenticate (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\authenticate.js:349:7)
at index.js:10:3
at Layer.handle as handle_request
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\route.js:112:3)
at Layer.handle as handle_request
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:277:22
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at Function.handle (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:176:3)
at router (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:46:12)
From previous event:
at Promise.then (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\promise.js:21:17)
at E4Store.get (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express-sequelize-session\lib\e4store.js:56:12)
at session (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express-session\index.js:403:11)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at initialize (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\initialize.js:53:5)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at cookieParser (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\cookie-parser\index.js:70:5)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
The text was updated successfully, but these errors were encountered:
In the following code , server pop up warning:a promise was created in a handler but was not returned from it
export function changeTheme(req, res, next) {
var userId = req.user._id;
var theme = String(req.body.theme);
return User.find({
where: {
_id: userId
}
})
.then(user => {
user.theme = theme;
return user.save()
.then(() => {
res.status(204).end();
})
.catch(validationError(res));
});
}
Here is stack Trace:
PUT /api/users/155/theme 200 208.007 ms - 15
Warning: a promise was created in a handler but was not returned from it
at processImmediate as _immediateCallback
From previous event:
at [object Object].Model.findAll (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\model.js:1347:18)
at [object Object].Model.findOne (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\model.js:1519:34)
at localAuthenticate (passport.js:5:8)
at Strategy._verify (passport.js:35:12)
at Strategy.authenticate (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport-local\lib\strategy.js:90:12)
at attempt (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\authenticate.js:348:16)
at authenticate (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\authenticate.js:349:7)
at index.js:10:3
at Layer.handle as handle_request
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\route.js:112:3)
at Layer.handle as handle_request
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:277:22
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at Function.handle (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:176:3)
at router (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:46:12)
From previous event:
at Promise.then (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\sequelize\lib\promise.js:21:17)
at E4Store.get (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express-sequelize-session\lib\e4store.js:56:12)
at session (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express-session\index.js:403:11)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at initialize (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\passport\lib\middleware\initialize.js:53:5)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
at next (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:271:10)
at cookieParser (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\cookie-parser\index.js:70:5)
at Layer.handle as handle_request
at trim_prefix (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:312:13)
at H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:280:7
at Function.process_params (H:\nginx-1.9.14\html\bootswatchMenu2\node_modules\express\lib\router\index.js:330:12)
The text was updated successfully, but these errors were encountered: