MCPcopy
hub / github.com/urllib3/urllib3 / NameResolutionError

Class NameResolutionError

src/urllib3/exceptions.py:166–177  ·  view source on GitHub ↗

Raised when host name resolution fails.

Source from the content-addressed store, hash-verified

164
165
166class NameResolutionError(NewConnectionError):
167 """Raised when host name resolution fails."""
168
169 def __init__(self, host: str, conn: HTTPConnection, reason: socket.gaierror):
170 message = f"Failed to resolve '{host}' ({reason})"
171 self._host = host
172 self._reason = reason
173 super().__init__(conn, message)
174
175 def __reduce__(self) -> _TYPE_REDUCE_RESULT:
176 # For pickling purposes.
177 return self.__class__, (self._host, None, self._reason)
178
179
180class EmptyPoolError(PoolError):

Callers 1

_new_connMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected