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

Function applyBackpressureLabels

src/cmap/connect.ts:38–41  ·  view source on GitHub ↗
(error: MongoError)

Source from the content-addressed store, hash-verified

36export type Stream = Socket | TLSSocket;
37
38function applyBackpressureLabels(error: MongoError) {
39 error.addErrorLabel(MongoErrorLabel.SystemOverloadedError);
40 error.addErrorLabel(MongoErrorLabel.RetryableError);
41}
42
43export async function connect(options: ConnectionOptions): Promise<Connection> {
44 let connection: Connection | null = null;

Callers 2

executeHandshakeFunction · 0.85
makeSocketFunction · 0.85

Calls 1

addErrorLabelMethod · 0.80

Tested by

no test coverage detected