Skip to content

fix: prevent unhandledRejection in batchAppend#505

Open
avens19 wants to merge 1 commit into
kurrent-io:masterfrom
avens19:master
Open

fix: prevent unhandledRejection in batchAppend#505
avens19 wants to merge 1 commit into
kurrent-io:masterfrom
avens19:master

Conversation

@avens19
Copy link
Copy Markdown

@avens19 avens19 commented May 8, 2026

We saw some unhandledRejections during client reconnect coming from this code. Stack below:

TypeError: undefined is not iterable (cannot read property
Symbol(Symbol.iterator))
at ClientDuplexStreamImpl.<anonymous>
(/opt/app/node_modules/.pnpm/@kurrent+kurrentdb-client@1.1.2/node_modules/@kurrent/kurrentdb-client/dist/streams/appendToStream/batchAppend.js:21:35)
at ClientDuplexStreamImpl.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushObjectMode (node:internal/streams/readable:540:3)
at Readable.push (node:internal/streams/readable:395:5)
at Object.onReceiveMessage
(/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/client.js:411:24)
at Object.onReceiveMessage
(/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:319:178)
at
/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/resolving-call.js:213:39
at process.processTicksAndRejections
(node:internal/process/task_queues:104:5)

@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

…his code. Stack below:

```
TypeError: undefined is not iterable (cannot read property
Symbol(Symbol.iterator))
at ClientDuplexStreamImpl.<anonymous>
(/opt/app/node_modules/.pnpm/@kurrent+kurrentdb-client@1.1.2/node_modules/@kurrent/kurrentdb-client/dist/streams/appendToStream/batchAppend.js:21:35)
at ClientDuplexStreamImpl.emit (node:events:508:28)
at addChunk (node:internal/streams/readable:563:12)
at readableAddChunkPushObjectMode (node:internal/streams/readable:540:3)
at Readable.push (node:internal/streams/readable:395:5)
at Object.onReceiveMessage
(/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/client.js:411:24)
at Object.onReceiveMessage
(/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:319:178)
at
/opt/app/node_modules/.pnpm/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/resolving-call.js:213:39
at process.processTicksAndRejections
(node:internal/process/task_queues:104:5)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant