doOnBeforeError

fun <T> Single<T>.doOnBeforeError(consumer: (Throwable) -> Unit): Single<T>

Calls the consumer with the emitted Throwable when the Single signals onError. The consumer is called before the observer is called.

Please refer to the corresponding RxJava document.