An error with context for SDAM error handling.
| 1099 | |
| 1100 | |
| 1101 | class _ErrorContext: |
| 1102 | """An error with context for SDAM error handling.""" |
| 1103 | |
| 1104 | def __init__( |
| 1105 | self, |
| 1106 | error: BaseException, |
| 1107 | max_wire_version: int, |
| 1108 | sock_generation: int, |
| 1109 | completed_handshake: bool, |
| 1110 | service_id: Optional[ObjectId], |
| 1111 | ): |
| 1112 | self.error = error |
| 1113 | self.max_wire_version = max_wire_version |
| 1114 | self.sock_generation = sock_generation |
| 1115 | self.completed_handshake = completed_handshake |
| 1116 | self.service_id = service_id |
| 1117 | |
| 1118 | |
| 1119 | def _is_stale_error_topology_version( |
no outgoing calls