You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass db option as a string when creating Redis object:
const Redis = require("ioredis");
const redis = new Redis({db: 'some-string'})
It will throw an uncaught error:
(node:2467) UnhandledPromiseRejectionWarning: ReplyError: ERR invalid DB index
at parseError (node_modules/redis-parser/lib/parser.js:179:12)
at parseType (node_modules/redis-parser/lib/parser.js:302:14)
(node:2467) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2467) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
What causes this
All select commands have no callback or error handling in ioredis.
What I expect
This error is caught by ioredis either through a rejected promise fromRedis.connect() or the error event listener but not an unhandledPromiseRejection.
How to reproduce
Pass db option as a string when creating Redis object:
It will throw an uncaught error:
What causes this
All
select
commands have no callback or error handling in ioredis.What I expect
This error is caught by ioredis either through a rejected promise from
Redis.connect()
or the error event listener but not an unhandledPromiseRejection.Linked issues
The text was updated successfully, but these errors were encountered: