Class RecoveryErrorInfo

java.lang.Object
io.superdurable.dex.RecoveryErrorInfo

public final class RecoveryErrorInfo extends Object
Describes the final failure that caused a Step method recovery.

Read this value from Context.getRecoveryError(). Errors returned by a Worker preserve their original Java type name and detail. Backend failures such as timeouts use the Temporal or Cadence failure type.

RecoveryErrorInfo error = context.getRecoveryError();
if (error != null) {
    logger.warn("Recovering from {}: {}", error.getErrorType(), error.getDetail());
}
  • Method Details

    • getDetail

      public String getDetail()
      Returns the failure detail supplied by the Worker or backend.
      Returns:
      the failure detail, or an empty string when unavailable
    • getErrorType

      public String getErrorType()
      Returns the original Worker exception type or backend failure type.
      Returns:
      the error type, or an empty string when unavailable