For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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.RedivisError (Exception)

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

exceptions.APIError (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.AuthorizationError (APIError)

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

exceptions.NotFoundError (APIError)

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

exceptions.DeprecationError (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.JobError (RedivisError)

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

exceptions.NetworkError (RedivisError)

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

exceptions.ValueError (RedivisError, ValueError)

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

Last updated

Was this helpful?