.. module:: requests.models Errors and Exceptions --------------------- In the event of a network problem (e.g. DNS failure, refused connection, etc), Requests will raise a :exc:`~requests.exceptions.ConnectionError` exception. :meth:`Response.raise_for_status() ` will raise an :exc:`~requests.exceptions.HTTPError` if the HTTP request returned an unsuccessful status code. If a request times out, a :exc:`~requests.exceptions.Timeout` exception is raised. If a request exceeds the configured number of maximum redirections, a :exc:`~requests.exceptions.TooManyRedirects` exception is raised. All exceptions that Requests explicitly raises inherit from :exc:`requests.exceptions.RequestException`.