Class TaskFailedException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TaskCanceledException

public class TaskFailedException extends RuntimeException
Exception that gets thrown when awaiting a Task for an activity or sub-orchestration that fails with an unhandled exception.

Detailed information associated with a particular task failure can be retrieved using the getErrorDetails() method.

See Also:
  • Method Details

    • getTaskId

      public int getTaskId()
      Gets the ID of the failed task.

      Each durable task (activities, timers, sub-orchestrations, etc.) scheduled by a task orchestrator has an auto-incrementing ID associated with it. This ID is used to distinguish tasks from one another, even if, for example, they are tasks that call the same activity. This ID can therefore be used to more easily correlate a specific task failure to a specific task.

      Returns:
      the ID of the failed task
    • getTaskName

      public String getTaskName()
      Gets the name of the failed task.
      Returns:
      the name of the failed task
    • getErrorDetails

      public FailureDetails getErrorDetails()
      Gets the details of the task failure, including exception information.
      Returns:
      the details of the task failure