EventStore-Client-NodeJS icon indicating copy to clipboard operation
EventStore-Client-NodeJS copied to clipboard

fix: prevent unhandledRejection in batchAppend

Open avens19 opened this issue 6 months ago • 1 comments

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/@[email protected]/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/@[email protected]/node_modules/@grpc/grpc-js/build/src/client.js:411:24)
at Object.onReceiveMessage
(/opt/app/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:319:178)
at
/opt/app/node_modules/.pnpm/@[email protected]/node_modules/@grpc/grpc-js/build/src/resolving-call.js:213:39
at process.processTicksAndRejections
(node:internal/process/task_queues:104:5)

avens19 avatar May 08 '26 17:05 avens19

ⓘ 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.

qodo-code-review[bot] avatar May 08 '26 17:05 qodo-code-review[bot]