Errors¶
Core Dagster error classes.
All errors thrown by the Dagster framework inherit from DagsterError
. Users
should not subclass this base class for their own exceptions.
There is another exception base class, DagsterUserCodeExecutionError
, which is
used by the framework in concert with the user_code_error_boundary()
.
Dagster uses this construct to wrap user code into which it calls. User code can perform arbitrary
computations and may itself throw exceptions. The error boundary catches these user code-generated
exceptions, and then reraises them wrapped in a subclass of
DagsterUserCodeExecutionError
.
The wrapped exceptions include additional context for the original exceptions, injected by the Dagster runtime.
-
exception
dagster.
DagsterError
[source]¶ Base class for all errors thrown by the Dagster framework.
Users should not subclass this base class for their own exceptions.
-
exception
dagster.
DagsterConfigMappingFunctionError
(*args, **kwargs)[source]¶ Indicates that an unexpected error occurred while executing the body of a config mapping function defined in a
CompositeSolidDefinition
during config parsing.
-
exception
dagster.
DagsterEventLogInvalidForRun
(run_id)[source]¶ Raised when the event logs for a historical run are malformed or invalid.
-
exception
dagster.
DagsterExecutionStepExecutionError
(*args, **kwargs)[source]¶ Indicates an error occurred while executing the body of an execution step.
-
exception
dagster.
DagsterExecutionStepNotFoundError
(*args, **kwargs)[source]¶ Thrown when the user specifies execution step keys that do not exist.
-
exception
dagster.
DagsterInvalidConfigError
(preamble, errors, config_value, *args, **kwargs)[source]¶ Thrown when provided config is invalid (does not type check against the relevant config schema).
-
exception
dagster.
DagsterInvalidConfigDefinitionError
(original_root, current_value, stack, reason=None, **kwargs)[source]¶ Indicates that you have attempted to construct a config with an invalid value
- Acceptable values for config types are any of:
-
exception
dagster.
DagsterInvalidDefinitionError
[source]¶ Indicates that the rules for a definition have been violated by the user.
-
exception
dagster.
DagsterInvariantViolationError
[source]¶ Indicates the user has violated a well-defined invariant that can only be enforced at runtime.
-
exception
dagster.
DagsterResourceFunctionError
(*args, **kwargs)[source]¶ Indicates an error occurred while executing the body of the
resource_fn
in aResourceDefinition
during resource initialization.
-
exception
dagster.
DagsterRunNotFoundError
(*args, **kwargs)[source]¶ Thrown when a run cannot be found in run storage.
-
exception
dagster.
DagsterStepOutputNotFoundError
(*args, **kwargs)[source]¶ Indicates that previous step outputs required for an execution step to proceed are not available.
-
exception
dagster.
DagsterSubprocessError
(*args, **kwargs)[source]¶ An exception has occurred in one or more of the child processes dagster manages. This error forwards the message and stack trace for all of the collected errors.
-
exception
dagster.
DagsterTypeCheckDidNotPass
(description=None, metadata_entries=None, dagster_type=None)[source]¶ Indicates that a type check failed.
This is raised when
raise_on_error
isTrue
in calls to the synchronous pipeline and solid execution APIs (execute_pipeline()
,execute_solid()
, etc.), that is, typically in test, and aDagsterType
’s type check fails by returning eitherFalse
or an instance ofTypeCheck
whosesuccess
member isFalse
.
-
exception
dagster.
DagsterTypeCheckError
(*args, **kwargs)[source]¶ Indicates an error in the solid type system at runtime. E.g. a solid receives an unexpected input, or produces an output that does not match the type of the output definition.
-
exception
dagster.
DagsterUnknownResourceError
(resource_name, *args, **kwargs)[source]¶ Indicates that an unknown resource was accessed in the body of an execution step. May often happen by accessing a resource in the compute function of a solid without first supplying the solid with the correct required_resource_keys argument.
-
exception
dagster.
DagsterUnmetExecutorRequirementsError
[source]¶ Indicates the resolved executor is incompatible with the state of other systems such as the
DagsterInstance
or system storage configuration.
-
exception
dagster.
DagsterUserCodeExecutionError
(*args, **kwargs)[source]¶ This is the base class for any exception that is meant to wrap an
Exception
thrown by user code. It wraps that existing user code. Theoriginal_exc_info
argument to the constructor is meant to be a tuple of the type returned bysys.exc_info
at the call site of the constructor.Users should not subclass this base class for their own exceptions and should instead throw freely from user code. User exceptions will be automatically wrapped and rethrown.