static StatusHandler of(HttpStatus status,
                            Function<? super ClientRequestContext, ? extends Throwable> errorFunction) {
        requireNonNull(status, "status");
        requireNonNull(errorFunction, "errorFunction");
        return (ctx, s) -> s.equals(status) ? errorFunction.apply(ctx) : null;
    }
Returns a new {@link StatusHandler} that converts the specified {@link HttpStatus} to
a {@link Throwable}.
spring/spring6/src/main/java/com/linecorp/armeria/spring/client/StatusHandler.java