Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle possible unhandled promise rejection with autopipelining+…
…cluster (#1467) Deliberately add `asCallback` on the **same** Promise instance being returned, not on a different Promise instance that resolves to the same thing. Avoid this error: ```javascript process.on('unhandledRejection', (reason) => console.log('unhandledRejection', reason)); const x = Promise.reject(new Error()); x.catch((e) => console.log('caught x', e)); const causesUnhandledRejection = Promise.resolve().then(() => x); ``` Related to #1466
- Loading branch information