Skip to content
New issue

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

Handle possible unhandled promise rejection with autopipelining+cluster #1467

Merged
merged 1 commit into from
Nov 23, 2021

Commits on Nov 23, 2021

  1. Handle possible unhandled promise rejection with autopipelining+cluster

    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 redis#1466
    TysonAndre committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    47394d0 View commit details
    Browse the repository at this point in the history