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

Function isRetryableWriteError

src/error.ts:1446–1451  ·  view source on GitHub ↗
(error: MongoError)

Source from the content-addressed store, hash-verified

1444}
1445
1446export function isRetryableWriteError(error: MongoError): boolean {
1447 return (
1448 error.hasErrorLabel(MongoErrorLabel.RetryableWriteError) ||
1449 error.hasErrorLabel(MongoErrorLabel.PoolRequestedRetry)
1450 );
1451}
1452
1453/** Determines whether an error is something the driver should attempt to retry */
1454export function isRetryableReadError(error: MongoError): boolean {

Callers 6

commitTransactionMethod · 0.90
abortTransactionMethod · 0.90
canRetryFunction · 0.90
needsRetryableWriteLabelFunction · 0.85

Calls 1

hasErrorLabelMethod · 0.45

Tested by

no test coverage detected