Class WorkerInvocationException

All Implemented Interfaces:
Serializable

public final class WorkerInvocationException extends DexServiceException
Reports that a Java worker failed while executing a Step or RPC invocation.

The exception preserves both the outer Dex service status and, when supplied, the original worker exception type, detail, and gRPC status. These fields are intended for diagnostics; user code should not depend on Java exception class names as a durable protocol.

See Also:
  • Constructor Details

    • WorkerInvocationException

      public WorkerInvocationException(io.grpc.Status.Code code, String detail, String workerErrorType, String workerErrorDetail, String workerStackTrace, io.grpc.Status.Code workerCode, Throwable cause)
      Creates a worker failure with its original worker metadata.
      Parameters:
      code - the outer Dex service gRPC status code
      detail - the outer Dex service error detail
      workerErrorType - the original worker exception type, or an empty string
      workerErrorDetail - the original worker exception detail, or an empty string
      workerStackTrace - the original worker stack trace, or an empty string
      workerCode - the original worker gRPC status code, or null when unavailable
      cause - the original client transport failure
  • Method Details

    • getWorkerErrorType

      public String getWorkerErrorType()
      Returns the original worker exception type.
      Returns:
      the worker error type, or an empty string when unavailable
    • getWorkerErrorDetail

      public String getWorkerErrorDetail()
      Returns the original worker exception detail.
      Returns:
      the worker error detail, or an empty string when unavailable
    • getWorkerStackTrace

      public String getWorkerStackTrace()
      Returns the original worker-side stack trace.

      Java Workers include the exception's causes and suppressed exceptions. The serialized value is limited to 4 KiB and ends with a truncation marker when the full trace is larger. Other Worker SDKs may return an empty string when they do not provide stack traces.

      Returns:
      the worker stack trace, or an empty string when unavailable
    • getWorkerCode

      public io.grpc.Status.Code getWorkerCode()
      Returns the original worker-side gRPC status code.
      Returns:
      the worker status code, or null when unavailable