Lines Matching refs:error

13 non-error returns.  The HTTPRedirectHandler automatically deals with
71 # If an authentication error handler that tries to perform
72 # authentication for some reason but fails, how should the error be
73 # signalled? The client needs to know the HTTP error code. But if
102 from urllib.error import URLError, HTTPError, ContentTooShortError
453 if condition.startswith("error"):
544 def error(self, proto, *args):
625 """Process HTTP error responses."""
634 response = self.parent.error(
753 inf_msg = "The HTTP server returned a redirect error that would " \
755 "The last 30x error message was:\n"
1350 except OSError as err: # timeout error
1537 raise URLError('ftp error: no host given')
1793 raise OSError('socket error', msg) from msg
1798 raise OSError('url error', 'unknown url type', type)
1803 raise OSError('url error', 'invalid proxy for %s' % type, proxy)
1911 if not host: raise OSError('http error', 'no host given')
1951 raise URLError("http protocol error: bad status line")
1971 named http_error_DDD where DDD is the 3-digit error code."""
1972 # First check if there's a specific handler for this error
1984 """Default error handler: close the connection and raise OSError."""
2001 raise URLError('file error: proxy support for file protocol currently not implemented')
2037 raise URLError('local file error: not on local host')
2042 raise URLError('ftp error: proxy support for ftp protocol currently not implemented')
2045 if not host: raise URLError('ftp error: no host given')
2095 raise URLError(f'ftp error: {exp}') from exp
2100 raise URLError('data error: proxy support for data protocol currently not implemented')
2111 raise OSError('data error', 'bad data URL')
2149 """Default error handling -- don't raise an exception."""
2207 """Error 307 -- relocated, but turn POST into error."""
2214 """Error 308 -- relocated, but turn POST into error."""
2445 raise URLError(f'ftp error: {reason}') from reason
2456 raise URLError('ftp error: %r' % reason) from reason