RetryableResultException

class RetryableResultException(message: String = "Retry requested by shouldRetryResult", val lastValue: Any? = null) : Exception

Passed to RetryPolicyConfig.onRetry (and emitted as com.santimattius.resilient.telemetry.ResilientEvent.RetryAttempt) when a retry is triggered by RetryPolicyConfig.shouldRetryResult, not by an exception from block.

This type is not thrown to the caller of DefaultRetryPolicy.execute when retries are exhausted by result; in that case the last value is returned. It is only used as the Throwable argument for RetryPolicyConfig.onRetry and for observability.

Constructors

Link copied to clipboard
constructor(message: String = "Retry requested by shouldRetryResult", lastValue: Any? = null)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

The successful return value that caused RetryPolicyConfig.shouldRetryResult to return true.

Link copied to clipboard
expect open val message: String?