Skip to content
Myr

exceptions.py

This file

Path

requests/exceptions.py

41 lines · 1.0 KiB · Python

Last changed by

Merge pull request #610 from medwards/whitespaceKenneth Reitzbefore adoption40d3253

History of this file

Take it

1# -*- coding: utf-8 -*-23"""4requests.exceptions5~~~~~~~~~~~~~~~~~~~67This module contains the set of Requests' exceptions.89"""1011class RequestException(RuntimeError):12    """There was an ambiguous exception that occurred while handling your13    request."""1415class HTTPError(RequestException):16    """An HTTP error occurred."""17    response = None1819class ConnectionError(RequestException):20    """A Connection error occurred."""2122class SSLError(ConnectionError):23    """An SSL error occurred."""2425class Timeout(RequestException):26    """The request timed out."""2728class URLRequired(RequestException):29    """A valid URL is required to make a request."""3031class TooManyRedirects(RequestException):32    """Too many redirects."""3334class MissingSchema(RequestException, ValueError):35    """The URL schema (e.g. http or https) is missing."""3637class InvalidSchema(RequestException, ValueError):38    """See defaults.py for valid schemas."""3940class InvalidURL(RequestException, ValueError):41    """ The URL provided was somehow invalid. """