@Override
        public void onError(Throwable t) {
            if (completed) {
                return;
            }
            completed = true;
            final Throwable filteredCause = beforeError(delegate, t);
            if (filteredCause != null) {
                delegate.onError(filteredCause);
                completionFuture.completeExceptionally(filteredCause);
            } else {
                if (logger.isWarnEnabled()) {
                    logger.warn("{}#beforeError() returned null. Using the original exception: {}",
                                FilteredStreamMessage.this.getClass().getName(), t.toString());
                }
                delegate.onError(t);
                completionFuture.completeExceptionally(t);
            }
        }
A callback executed when this {@link StreamMessage} is canceled by the {@link Subscriber}.
core/src/main/java/com/linecorp/armeria/common/stream/FilteredStreamMessage.java