MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / handle_error

Method handle_error

pymongo/asynchronous/topology.py:931–938  ·  view source on GitHub ↗

Handle an application error. May reset the server to Unknown, clear the pool, and request an immediate check depending on the error and the context.

(self, address: _Address, err_ctx: _ErrorContext)

Source from the content-addressed store, hash-verified

929 server._monitor.cancel_check()
930
931 async def handle_error(self, address: _Address, err_ctx: _ErrorContext) -> None:
932 """Handle an application error.
933
934 May reset the server to Unknown, clear the pool, and request an
935 immediate check depending on the error and the context.
936 """
937 async with self._lock:
938 await self._handle_error(address, err_ctx)
939
940 def _request_check_all(self) -> None:
941 """Wake all monitors. Hold the lock when calling this."""

Callers 2

update_poolMethod · 0.95
handleMethod · 0.45

Calls 1

_handle_errorMethod · 0.95

Tested by

no test coverage detected