# redivis.exceptions

## Overview

The following exceptions may be raised by Redivis, and can be caught and reacted to directly. All exceptions are exported under `redivis.exceptions`.

```python
import redivis

try:
    redivis.notebook("some notebook").run()
except redivis.exceptions.JobError as e:
   """ Handle notebook run failure """
except redivis.exceptions.NotFoundError as e:
   """ Handle notebook not found """
```

#### exceptions.<mark style="color:purple;">RedivisError</mark> *(Exception)*

The base Redivis exception class. All other Redivis exceptions inherit from it. Extends python's native Exception class.

#### exceptions.<mark style="color:purple;">APIError</mark> *(RedivisError)*

The base API Error class, extends RedivisError. Associated with any non-successful response from the Redivis API. Has a `status_code` property, an integer with the HTTP status code of the API response.

#### exceptions.<mark style="color:purple;">AuthorizationError</mark> *(APIError)*

Raised for all "not authorized" API errors. Extends APIError.

#### exceptions.<mark style="color:purple;">NotFoundError</mark> *(APIError)*

Raised for all "not found" API errors. Extends APIError.

#### exceptions.<mark style="color:purple;">DeprecationError</mark> *(RedivisError)*

Raised only for methods that have been fully deprecated and removed. Typically, deprecated code paths will emit a warning for several versions of this library, before being fully removed and raising this error. Extends RedivisError.

#### exceptions.<mark style="color:purple;">JobError</mark> *(RedivisError)*

Raised whenever a long-running job on Redivis fails to complete successfully. Can occur when running: queries, transforms, notebooks, and uploads.

#### exceptions.<mark style="color:purple;">NetworkError</mark> *(RedivisError)*

Raised whenever a networking error occurs. The `original_exception` property contains the original exception from the network stack, when relevant. Extends RedivisError.

#### exceptions.<mark style="color:purple;">ValueError</mark> *(RedivisError, ValueError)*

Raised whenever an invalid value is passed to a method in this package. Extends both RedivisError and python's built-in ValueError.
