private void downstreamOnError(Throwable cause, SubscriptionImpl downstreamSubscription) {
        final Subscriber<Object> subscriber = downstreamSubscription.subscriber();
        try {
            if (!downstreamOnSubscribeCalled) {
                downstreamOnSubscribeCalled = true;
                subscriber.onSubscribe(downstreamSubscription);
            }

            if (downstreamSubscription.shouldNotifyCancellation() ||
                !(cause instanceof CancelledSubscriptionException)) {
                subscriber.onError(cause);
            }
        } catch (Throwable t) {
            final Exception composite = new CompositeException(t, cause);
            throwIfFatal(t);
            logger.warn("Subscriber.onSubscribe() or onError() should not raise an exception. subscriber: {}",
                        subscriber, composite);
        }
        whenComplete().completeExceptionally(cause);
    }
Closes the deferred stream without setting a delegate.

@throws IllegalStateException if the delegate has been set already or
                              if {@link #close()} or {@link #close(Throwable)} was called already.
core/src/main/java/com/linecorp/armeria/common/stream/DeferredStreamMessage.java