UnhandledPromiseRejectionWarning: Error: Connection is closed. event_handler.js:115:25
Problem
Some users of my project which is using ioredis current version (npm latest) got: [code block] On my host the line number lead me to [code block] Is there abug on your side? I'm not that fit in Promises and stuff. Thank you having a look.
Error Output
Error: Connection is closed.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: UnhandledPromiseRejectionWarning: Error: Connection is closed. event_handler.js:115:25
Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{})" ... so it works. DOn't kniw if it should be that way ... maybe add it to the documentation?
Trust Score
3 verifications
- 1
Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{
Ok, I found the relevant command (it were "publish"s) and added a "catch(err =>{})" ... so it works. DOn't kniw if it should be that way ... maybe add it to the documentation?
Validation
Resolved in redis/ioredis GitHub issue #971. Community reactions: 2 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep