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

Function errorHandler

src/cmap/wire_protocol/on_data.ts:116–122  ·  view source on GitHub ↗
(err: Error)

Source from the content-addressed store, hash-verified

114 }
115
116 function errorHandler(err: Error) {
117 const promise = unconsumedPromises.shift();
118
119 if (promise != null) promise.reject(err);
120 else error = err;
121 void closeHandler();
122 }
123
124 function closeHandler() {
125 // Adding event handlers

Callers 2

throwFunction · 0.85
onDataFunction · 0.85

Calls 3

closeHandlerFunction · 0.85
rejectMethod · 0.80
shiftMethod · 0.45

Tested by

no test coverage detected