EventStore-Client-NodeJS
EventStore-Client-NodeJS copied to clipboard
fix: prevent unhandledRejection in batchAppend
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)
ⓘ 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.