# -*- coding: utf-8 -*-
requests.exceptions ~~~~~~~~~~~~~~~~~~~
This module contains the set of Requests' exceptions. """
"""There was an ambiguous exception that occurred while handling your request. """
"""Initialize RequestException with `request` and `response` objects.""" response = kwargs.pop('response', None) self.response = response self.request = kwargs.pop('request', None) if (response is not None and not self.request and hasattr(response, 'request')): self.request = self.response.request super(RequestException, self).__init__(*args, **kwargs)
"""An HTTP error occurred."""
"""A Connection error occurred."""
"""A proxy error occurred."""
"""An SSL error occurred."""
"""The request timed out.
Catching this error will catch both :exc:`~requests.exceptions.ConnectTimeout` and :exc:`~requests.exceptions.ReadTimeout` errors. """
"""The request timed out while trying to connect to the remote server.
Requests that produced this error are safe to retry. """
"""The server did not send any data in the allotted amount of time."""
"""A valid URL is required to make a request."""
"""Too many redirects."""
"""The URL schema (e.g. http or https) is missing."""
"""See defaults.py for valid schemas."""
"""The URL provided was somehow invalid."""
"""The header value provided was somehow invalid."""
"""The proxy URL provided is invalid."""
"""The server declared chunked encoding but sent an invalid chunk."""
"""Failed to decode response content."""
"""The content for this response was already consumed."""
"""Custom retries logic failed"""
"""Requests encountered an error when trying to rewind a body."""
# Warnings
"""Base warning for Requests."""
"""A file was opened in text mode, but Requests determined its binary length."""
"""An imported dependency doesn't match the expected version range.""" |