reactor-core/src/main/java/reactor/core/publisher/Mono.java
public final <E extends Throwable> Mono<T> doOnError(Class<E> exceptionType,
			final Consumer<? super E> onError) {
		Objects.requireNonNull(exceptionType, "type");
		@SuppressWarnings("unchecked")
		Consumer<Throwable> handler = (Consumer<Throwable>)onError;
		return doOnError(exceptionType::isInstance, handler);
	}
public final <E extends Throwable> Mono<T> doOnError(Class<E> exceptionType,
			final Consumer<? super E> onError) {
		Objects.requireNonNull(exceptionType, "type");
		@SuppressWarnings("unchecked")
		Consumer<Throwable> handler = (Consumer<Throwable>)onError;
		return doOnError(exceptionType::isInstance, handler);
	}
Add behavior triggered when the {@link Mono} completes with an error matching the given exception type.
<p>
<img class="marble" src="doc-files/marbles/doOnErrorWithClassPredicateForMono.svg" alt="">

@param exceptionType the type of exceptions to handle
@param onError the error handler for relevant errors
@param <E> type of the error to handle

@return an observed  {@link Mono}