MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _wtimeout_error

Function _wtimeout_error

pymongo/errors.py:279–281  ·  view source on GitHub ↗

Return True if this writeConcernError doc is a caused by a timeout.

(error: Any)

Source from the content-addressed store, hash-verified

277
278
279def _wtimeout_error(error: Any) -> bool:
280 """Return True if this writeConcernError doc is a caused by a timeout."""
281 return error.get("code") == 50 or ("errInfo" in error and error["errInfo"].get("wtimeout"))
282
283
284class BulkWriteError(OperationFailure):

Callers 2

timeoutMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected