# 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`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/redivis/exceptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
