onError

abstract suspend fun onError(throwable: Throwable): Boolean(source)

Handles an error that occurred during the asynchronous operation execution. Such handling may include deciding whether to retry the operation or ignore the error and complete the operation. This method might propagate the error if retrying is no longer possible (e.g., the maximum number of attempts was reached), and the caller did not specify a custom error handler.

Return

true if the operation should be retried, false otherwise.

Parameters

throwable

The throwable representing the error that occurred.