2.0.0b1

flyte.errors

Exceptions raised by Union.

These errors are raised when the underlying task execution fails, either because of a user error, system error or an unknown error.

Directory

Errors

Exception Description
ActionNotFoundError This error is raised when the user tries to access an action that does not exist.
BaseRuntimeError Base class for all Union runtime errors.
CustomError This error is raised when the user raises a custom error.
DeploymentError This error is raised when the deployment of a task fails, or some preconditions for deployment are not met.
ImageBuildError This error is raised when the image build fails.
ImagePullBackOffError This error is raised when the image cannot be pulled.
InitializationError This error is raised when the Union system is tried to access without being initialized.
InvalidImageNameError This error is raised when the image name is invalid.
LogsNotYetAvailableError This error is raised when the logs are not yet available for a task.
NotInTaskContextError This error is raised when the user tries to access the task context outside of a task.
OOMError This error is raised when the underlying task execution fails because of an out-of-memory error.
PrimaryContainerNotFoundError This error is raised when the primary container is not found.
ReferenceTaskError This error is raised when the user tries to access a task that does not exist.
RetriesExhaustedError This error is raised when the underlying task execution fails after all retries have been exhausted.
RuntimeDataValidationError This error is raised when the user tries to access a resource that does not exist or is invalid.
RuntimeSystemError This error is raised when the underlying task execution fails because of a system error.
RuntimeUnknownError This error is raised when the underlying task execution fails because of an unknown error.
RuntimeUserError This error is raised when the underlying task execution fails because of an error in the user’s code.
TaskInterruptedError This error is raised when the underlying task execution is interrupted.
TaskTimeoutError This error is raised when the underlying task execution runs for longer than the specified timeout.
UnionRpcError This error is raised when communication with the Union server fails.

flyte.errors.ActionNotFoundError

This error is raised when the user tries to access an action that does not exist.

flyte.errors.BaseRuntimeError

Base class for all Union runtime errors. These errors are raised when the underlying task execution fails, either because of a user error, system error or an unknown error.

class BaseRuntimeError(
    code: str,
    kind: typing.Literal['system', 'unknown', 'user'],
    root_cause_message: str,
    worker: str | None,
)
Parameter Type
code str
kind typing.Literal['system', 'unknown', 'user']
root_cause_message str
worker str | None

flyte.errors.CustomError

This error is raised when the user raises a custom error.

class CustomError(
    code: str,
    message: str,
)
Parameter Type
code str
message str

Methods

Method Description
from_exception() Create a CustomError from an exception.

from_exception()

def from_exception(
    e: Exception,
)

Create a CustomError from an exception. The exception’s class name is used as the error code and the exception message is used as the error message.

Parameter Type
e Exception

flyte.errors.DeploymentError

This error is raised when the deployment of a task fails, or some preconditions for deployment are not met.

class DeploymentError(
    message: str,
)
Parameter Type
message str

flyte.errors.ImageBuildError

This error is raised when the image build fails.

class ImageBuildError(
    message: str,
)
Parameter Type
message str

flyte.errors.ImagePullBackOffError

This error is raised when the image cannot be pulled.

class ImagePullBackOffError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.InitializationError

This error is raised when the Union system is tried to access without being initialized.

class InitializationError(
    code: str,
    kind: typing.Literal['system', 'unknown', 'user'],
    root_cause_message: str,
    worker: str | None,
)
Parameter Type
code str
kind typing.Literal['system', 'unknown', 'user']
root_cause_message str
worker str | None

flyte.errors.InvalidImageNameError

This error is raised when the image name is invalid.

class InvalidImageNameError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.LogsNotYetAvailableError

This error is raised when the logs are not yet available for a task.

class LogsNotYetAvailableError(
    message: str,
)
Parameter Type
message str

flyte.errors.NotInTaskContextError

This error is raised when the user tries to access the task context outside of a task.

class NotInTaskContextError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.OOMError

This error is raised when the underlying task execution fails because of an out-of-memory error.

class OOMError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.PrimaryContainerNotFoundError

This error is raised when the primary container is not found.

class PrimaryContainerNotFoundError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.ReferenceTaskError

This error is raised when the user tries to access a task that does not exist.

class ReferenceTaskError(
    message: str,
)
Parameter Type
message str

flyte.errors.RetriesExhaustedError

This error is raised when the underlying task execution fails after all retries have been exhausted.

class RetriesExhaustedError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.RuntimeDataValidationError

This error is raised when the user tries to access a resource that does not exist or is invalid.

class RuntimeDataValidationError(
    var: str,
    e: Exception | str,
    task_name: str,
)
Parameter Type
var str
e Exception | str
task_name str

flyte.errors.RuntimeSystemError

This error is raised when the underlying task execution fails because of a system error. This could be a bug in the Union system or a bug in the user’s code.

class RuntimeSystemError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.RuntimeUnknownError

This error is raised when the underlying task execution fails because of an unknown error.

class RuntimeUnknownError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.RuntimeUserError

This error is raised when the underlying task execution fails because of an error in the user’s code.

class RuntimeUserError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.TaskInterruptedError

This error is raised when the underlying task execution is interrupted.

class TaskInterruptedError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.TaskTimeoutError

This error is raised when the underlying task execution runs for longer than the specified timeout.

class TaskTimeoutError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None

flyte.errors.UnionRpcError

This error is raised when communication with the Union server fails.

class UnionRpcError(
    code: str,
    message: str,
    worker: str | None,
)
Parameter Type
code str
message str
worker str | None