# exceptions

## Overview

The following exceptions may be raised by Redivis, and can be caught and reacted to directly.

```r
tryCatch(
  {
    redivis$notebook("some_notebook")$run()
  },
  redivis_job_error = function(e) {
    # Handle issue running job
  },
  redivis_not_found_error = function(e) {
    # Handle not found
  }
)
```

#### <mark style="color:purple;">redivis\_error</mark>

The base Redivis exception class. All other Redivis exceptions inherit from it.

#### <mark style="color:purple;">redivis\_api\_error</mark> *(redivis\_error)*

The base API Error, also a `redivis_error`. 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.

#### <mark style="color:purple;">redivis\_authorization\_error</mark> *(redivis\_api\_error)*

Raised for all "not authorized" API errors. Also a `redivis_api_error`.

#### <mark style="color:purple;">redivis\_not\_found\_error</mark> *(redivis\_api\_error)*

Raised for all "not found" API errors. Also a `redivis_api_error`.

#### <mark style="color:purple;">redivis\_deprecation\_error</mark> *(redivis\_error)*

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. Also a `redivis_error`.

#### <mark style="color:purple;">redivis\_job\_error</mark> *(redivis\_error)*

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

#### <mark style="color:purple;">redivis\_networkError</mark> *(redivis\_error)*

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

#### <mark style="color:purple;">redivis\_value\_error</mark> *(redivis\_error)*

Raised whenever an invalid value is passed to a method in this package. Also a `redivis_error`.
