Job failures¶
Source: R/errors-operations.R ยท Help: ?job_errors
Errors that stop a job before or while it does its work: credentials that
are refused, a permission that is missing, a configuration option that is
invalid, a resource that does not exist, and an operation that ran out of
time. All inherit from dataexcept_job_error, as they inherit from
JobError in the Python package.
Usage¶
authentication_error(user, message = NULL, parent = NULL, call = NULL)
authorization_error(user, permission, parent = NULL, call = NULL)
configuration_error(option, message = NULL, parent = NULL, call = NULL)
resource_not_found_error(resource_type, identifier, parent = NULL, call = NULL)
operation_timeout_error(operation, timeout, parent = NULL, call = NULL)
Arguments¶
user- The user whose credentials or permissions were refused.
message- A message to use instead of the default.
parent- The condition that caused this one, or
NULL. call- The call to report, or
NULL. permission- The permission the user lacks.
option- The configuration option that is invalid.
resource_type- The kind of resource, such as
"Dataset". identifier- The identifier that was looked up.
operation- The operation that timed out.
timeout- The time limit that elapsed, in seconds.
Value¶
A condition inheriting from dataexcept_job_error.
Details¶
authentication_error() and authorization_error() are permanent and not
retryable: the same credentials will be refused again. The others are
"unknown".
In the Python package ValidationError is a JobError too. In R,
validation_error() stays a direct child of dataexcept_error, as it has
been since the first release, so a dataexcept_job_error handler does not
catch it.
Examples¶
get_setting <- function(settings, option) {
value <- settings[[option]]
if (is.null(value)) stop(configuration_error(option))
value
}
tryCatch(
get_setting(list(retries = 3), "timeout"),
dataexcept_job_error = function(e) conditionMessage(e)
)
err <- resource_not_found_error("Dataset", "sales-2026-q3")
conditionMessage(err)
is_retryable(authorization_error("analyst", "write:reports"))
See also¶
Other dataexcept errors:
data_engineering_errors,
data_frame_errors,
data_quality_errors,
file_errors,
model_quality_errors,
modelling_errors,
pipeline_errors,
service_errors,
validation_error()