Skip to content
Myr

exceptions.py

This file

Path

requests/exceptions.py

28 lines · 635 bytes · Python

Last changed by

new ConnectionError for bad APIs :)Kenneth Reitzbefore adoption1d2abea

History of this file

Take it

1# -*- coding: utf-8 -*-23"""4requests.exceptions5~~~~~~~~~~~~~~~~~~~67This module contains the set of Requests' exceptions.89"""1011class RequestException(Exception):12    """There was an ambiguous exception that occurred while handling your13    request."""1415class HTTPError(RequestException):16    """An HTTP error occured."""1718class ConnectionError(RequestException):19    """A Connection error occured."""2021class Timeout(RequestException):22    """The request timed out."""2324class URLRequired(RequestException):25    """A valid URL is required to make a request."""2627class TooManyRedirects(RequestException):28    """Too many redirects."""