We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b701d5d commit d5ff074Copy full SHA for d5ff074
src/gridfs/download.ts
@@ -262,7 +262,9 @@ function doRead(stream: GridFSBucketReadStream): void {
262
if (bytesRemaining <= 0) {
263
return stream.emit(
264
GridFSBucketReadStream.ERROR,
265
- new MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${doc.n}`)
+ new MongoGridFSChunkError(
266
+ `ExtraChunk: Got unexpected n: ${doc.n}, expected file length ${stream.s.file.length} bytes but already read ${stream.s.bytesRead} bytes`
267
+ )
268
);
269
}
270
0 commit comments