@Nullable
    protected Throwable beforeError(Subscriber<? super U> subscriber, Throwable cause) {
        return cause;
    }
A callback executed just before calling {@link Subscriber#onError(Throwable)} on {@code subscriber}.
Override this method to execute any cleanup logic that may be needed before failing the
subscription. This method may rewrite the {@code cause} and then return a new one so that the new
{@link Throwable} would be passed to {@link Subscriber#onError(Throwable)}.
core/src/main/java/com/linecorp/armeria/common/stream/FilteredStreamMessage.java