@Override
        public final void onError(Throwable ex) {
            if (state == State.READY_TO_WRITE) {
                requiredWriteSubscriber().onError(ex);
                return;
            }
            synchronized (this) {
                if (state == State.READY_TO_WRITE) {
                    requiredWriteSubscriber().onError(ex);
                } else if (state == State.NEW) {
                    state = State.FIRST_SIGNAL_RECEIVED;
                    writeCompletionBarrier.onError(ex);
                } else {
                    error = ex;
                }
            }
        }
The actual writeSubscriber from the HTTP server adapter.
spring/boot3-webflux-autoconfigure/src/main/java/com/linecorp/armeria/spring/web/reactive/ChannelSendOperator.java