module documentation

Common Temporal exceptions.

Class RetryState Current retry state of the workflow/activity during error.
Class TimeoutType Type of timeout for TimeoutError.
Exception ActivityError Error raised on activity failure.
Exception ApplicationError Error raised during workflow/activity execution.
Exception CancelledError Error raised on workflow/activity cancellation.
Exception ChildWorkflowError Error raised on child workflow failure.
Exception FailureError Base for runtime failures during workflow/activity execution.
Exception ServerError Error originating in the Temporal server.
Exception TemporalError Base for all Temporal exceptions.
Exception TerminatedError Error raised on workflow cancellation.
Exception TimeoutError Error raised on workflow/activity timeout.
Exception WorkflowAlreadyStartedError Thrown by a client or workflow when a workflow execution has already started.
Function is_cancelled_exception Check whether the given exception is considered a cancellation exception according to Temporal.
def is_cancelled_exception(exception: BaseException) -> bool: (source)

Check whether the given exception is considered a cancellation exception according to Temporal.

This is often used in a conditional of a catch clause to check whether a cancel occurred inside of a workflow. This can occur from asyncio.CancelledError or CancelledError or either ActivityError or ChildWorkflowError if either of those latter two have a CancelledError cause.

Parameters
exception:BaseExceptionException to check.
Returns
boolTrue if a cancelled exception, false if not.