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

Function isMaxTimeMSExpiredError

src/sessions.ts:1024–1033  ·  view source on GitHub ↗
(err: MongoError)

Source from the content-addressed store, hash-verified

1022}
1023
1024function isMaxTimeMSExpiredError(err: MongoError): boolean {
1025 if (err == null || !(err instanceof MongoServerError)) {
1026 return false;
1027 }
1028
1029 return (
1030 err.code === MONGODB_ERROR_CODES.MaxTimeMSExpired ||
1031 err.writeConcernError?.code === MONGODB_ERROR_CODES.MaxTimeMSExpired
1032 );
1033}
1034
1035/** @public */
1036export type ServerSessionId = { id: Binary };

Calls

no outgoing calls

Tested by

no test coverage detected