Open aayush-practo opened 8 years ago
I have this same issue. My code is this:
request.get(
/api/interval/${from}/${to}) .then(res => { return dispatch({ type: 'ACTION_RES', payload: res.body }) }, error => { return dispatch({type: 'ACTION_RES', error: true, payload: error}) })
Is there a way to suppress that warning?
I'm having the same issue using a get as well:
const sign_out = s => request.get(s.url).withCredentials().promise()
const sign_outs = services.map(s => sign_out(s).reflect())
Promise.all(sign_outs)
.each(i => console.log(i.isFulfilled()))
These issues are addressed at http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it.
After your nested calls, return null
to signal that you are aware that you are not returning created promises in the handler.
I'm still getting this issue even with return null
in the following code. I'll try to investigate.
return fetchUsersService(token)
.then(response => {
dispatch(successActionCreator(response.body));
return null;
});
I have the same issue as @dehli
I have updated sails to v0.12.1, node@4.2.3, npm@2.14.7 and using sails-mysql@0.11.3 adapter, superagent-bluebird-promise@3.0.0. For a promise like:
I am getting warning
However, adding a return true at the end of first promise, does not give the warning.
Is there any other possible way to suppress the warning?