redis / redis/node-redis

cluster-slots

Open
#3,059 2 comments 0 reactions 1 assignee View on GitHub

@nkaradzhov is already working on this.

Since Aug 19, 2025.

Bug stale
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

Description

When attempting to tap into the class created by 'createCluster' with on('error', ...). When a node within the cluster comes offline unexpectedly the library runs https://github.com/redis/node-redis/blob/master/packages/client/lib/cluster/cluster-slots.ts#L346 and crashes the application. Instead of console.error(err) ... can this be this.#emit('error', err) so that the error can be tapped into?

Node.js Version

22.15.0

Redis Server Version

8.2-alpine

Node Redis Version

5.8.1

Platform

Linux

Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.