redivis.errors
All errors thrown by this library are instances of redivis.errors.RedivisError. Subclasses of RedivisError can be used to handle specific failures:
import redivis from 'redivis';
try {
await redivis.workflow('jane.my_workflow').notebook('my_notebook').run();
} catch (e) {
if (e instanceof redivis.errors.JobError) {
// Handle notebook run failure
} else if (e instanceof redivis.errors.NotFoundError) {
// Handle notebook not found
} else {
throw e;
}
}errors.RedivisError (Error)
The base error class, which all other errors extend.
errors.APIError (RedivisError)
Thrown for any non-successful response from the Redivis API. Has a status (the HTTP status code), code (a machine-readable error code, e.g. 'invalid_request'), and description (a human-readable explanation).
errors.AuthorizationError (APIError)
Thrown for all "not authorized" (403) API errors.
errors.NotFoundError (APIError)
Thrown for all "not found" (404) API errors.
errors.JobError (RedivisError)
Thrown whenever a long-running job on Redivis fails to complete successfully: queries, uploads, exports, transforms, and notebooks. Has a kind (e.g. 'query') and status (e.g. 'failed').
errors.NetworkError (RedivisError)
Thrown when a request can't be completed, even after retrying. The underlying error is available as cause.
errors.ValueError (RedivisError)
Thrown when an invalid value or unknown option is passed to a method, or when an operation isn't valid in the current state or environment (e.g., downloading files in the browser).
Was this helpful?

