We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm getting Unhandled rejection for the following code with v1.4.0
Unhandled rejection
v1.4.0
import Promise from 'bluebird'; const dataloaderFn = cmdList => { return Promise.mapSeries(cmdList, ({promise, params}) => { if (typeof promise === 'function') return promise(params); throw new TypeError(`Promise isn't fucntion`); }); }; const d = new DataLoader(dataloaderFn, { cacheKeyFn: item => item.key, }); const job = async () => Promise.reject('fail'); const test = { key: 'a', promise: job, params: {}, }; d.load(test).catch(console.log);
The error is catched but node.js also report it as unhandled rejection, here is ouput
Unhandled rejection fail fail
If you call job().catch(console.log); then it isn't reported as unhandled rejection.
job().catch(console.log);
If you also remove async annotation then it works also with DataLoader
async
The text was updated successfully, but these errors were encountered:
The problem was in Bluebird petkaantonov/bluebird#1501
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm getting
Unhandled rejection
for the following code withv1.4.0
The error is catched but node.js also report it as unhandled rejection, here is ouput
If you call
job().catch(console.log);
then it isn't reported as unhandled rejection.If you also remove
async
annotation then it works also with DataLoaderThe text was updated successfully, but these errors were encountered: