MCPcopy
hub / github.com/mongodb/node-mongodb-native / handleError

Function handleError

src/gridfs/upload.ts:221–228  ·  view source on GitHub ↗
(stream: GridFSBucketWriteStream, error: Error, callback: Callback)

Source from the content-addressed store, hash-verified

219}
220
221function handleError(stream: GridFSBucketWriteStream, error: Error, callback: Callback): void {
222 if (stream.state.errored) {
223 queueMicrotask(callback);
224 return;
225 }
226 stream.state.errored = true;
227 queueMicrotask(() => callback(error));
228}
229
230function createChunkDoc(filesId: ObjectId, n: number, data: Uint8Array): GridFSChunk {
231 return {

Callers 4

_constructMethod · 0.70
checkDoneFunction · 0.70
doWriteFunction · 0.70
writeRemnantFunction · 0.70

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected