:py:mod:`grab.errors`
=====================

.. py:module:: grab.errors

.. autoapi-nested-parse::

   Custom exception which Grab instance could generate.

   Exceptions
   ----------
   - GrabError
       - GrabNetworkError
           - GrabTimeoutError
           - GrabConnectionError
           - GrabCouldNotResolveHostError
       - GrabAuthError
       - GrabMisuseError
       - GrabTooManyRedirectsError
       - GrabInvalidUrl
       - GrabInternalError
       - GrabFeatureIsDeprecated
       - ResponseNotValid
   - DataNotFound == IndexError

   .. warning:: - GrabDeprecationWarning



Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

   grab.errors.raise_feature_is_deprecated



Attributes
~~~~~~~~~~

.. autoapisummary::

   grab.errors.DataNotFound


.. py:exception:: GrabError

   Bases: :py:obj:`Exception`

   All custom Grab exception should be children of that class.


.. py:exception:: OriginalExceptionGrabError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`GrabError`

   Sub-class which constructor accepts original exception as second argument.


.. py:exception:: GrabNetworkError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`OriginalExceptionGrabError`

   Raises in case of network error.


.. py:exception:: GrabTimeoutError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`GrabNetworkError`

   Raises when configured time is outed for the request.


.. py:exception:: GrabConnectionError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`GrabNetworkError`

   Raised when it is not possible to establish network connection.


.. py:exception:: GrabCouldNotResolveHostError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`GrabNetworkError`

   Raised when couldn't resolve host. The given remote host was not resolved.


.. py:exception:: GrabAuthError

   Bases: :py:obj:`GrabError`

   Raised when remote server denies authentication credentials.


.. py:exception:: GrabMisuseError

   Bases: :py:obj:`GrabError`

   Indicates incorrect usage of grab API.


.. py:exception:: GrabTooManyRedirectsError

   Bases: :py:obj:`GrabError`

   Raised when max. allowed number of redirects is reaced.


.. py:exception:: GrabInvalidUrl

   Bases: :py:obj:`GrabError`

   Raised when error occurred while normalizing URL e.g. IDN processing.


.. py:exception:: GrabInvalidResponse(*args: Any, **kwargs: Any)

   Bases: :py:obj:`OriginalExceptionGrabError`

   Raised when network response's data could not be processed.


.. py:exception:: GrabInternalError(*args: Any, **kwargs: Any)

   Bases: :py:obj:`OriginalExceptionGrabError`

   Sub-class which constructor accepts original exception as second argument.


.. py:exception:: GrabFeatureIsDeprecated

   Bases: :py:obj:`GrabError`

   Raised when user tries to use feature that is deprecated and has been dropped.


.. py:function:: raise_feature_is_deprecated(feature_name: str) -> None


.. py:data:: DataNotFound
   

   

.. py:exception:: ResponseNotValid

   Bases: :py:obj:`GrabError`

   All custom Grab exception should be children of that class.


.. py:exception:: GrabDeprecationWarning

   Bases: :py:obj:`UserWarning`

   Base class for warnings generated by user code.


