grab.errors — Grab 0.6.41 documentation

# `grab.errors`

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

`raise_feature_is_deprecated`(→ None) |

### Attributes

`DataNotFound` |

exception grab.errors.GrabError

  Bases: `Exception`

  All custom Grab exception should be children of that class.

exception grab.errors.OriginalExceptionGrabError(*args: Any, **kwargs: Any)

  Bases: `GrabError`

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

exception grab.errors.GrabNetworkError(*args: Any, **kwargs: Any)

  Bases: `OriginalExceptionGrabError`

  Raises in case of network error.

exception grab.errors.GrabTimeoutError(*args: Any, **kwargs: Any)

  Bases: `GrabNetworkError`

  Raises when configured time is outed for the request.

exception grab.errors.GrabConnectionError(*args: Any, **kwargs: Any)

  Bases: `GrabNetworkError`

  Raised when it is not possible to establish network connection.

exception grab.errors.GrabCouldNotResolveHostError(*args: Any, **kwargs: Any)

  Bases: `GrabNetworkError`

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

exception grab.errors.GrabAuthError

  Bases: `GrabError`

  Raised when remote server denies authentication credentials.

exception grab.errors.GrabMisuseError

  Bases: `GrabError`

  Indicates incorrect usage of grab API.

exception grab.errors.GrabTooManyRedirectsError

  Bases: `GrabError`

  Raised when max. allowed number of redirects is reaced.

exception grab.errors.GrabInvalidUrl

  Bases: `GrabError`

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

exception grab.errors.GrabInvalidResponse(*args: Any, **kwargs: Any)

  Bases: `OriginalExceptionGrabError`

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

exception grab.errors.GrabInternalError(*args: Any, **kwargs: Any)

  Bases: `OriginalExceptionGrabError`

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

exception grab.errors.GrabFeatureIsDeprecated

  Bases: `GrabError`

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

grab.errors.raise_feature_is_deprecated(feature_name: str) → None

grab.errors.DataNotFound

exception grab.errors.ResponseNotValid

  Bases: `GrabError`

  All custom Grab exception should be children of that class.

exception grab.errors.GrabDeprecationWarning

  Bases: `UserWarning`

  Base class for warnings generated by user code.