public UnframedGrpcErrorHandlerBuilder registerMarshalledMessages(
            Iterable<? extends Message> messages) {
        requireNonNull(messages, "messages");
        checkState(jsonMarshaller == null,
                   "Cannot register the collection of messages because a custom JSON marshaller has " +
                   "already been set. Use the custom marshaller to register custom messages.");

        if (marshalledMessages == null) {
            marshalledMessages = new ArrayList<>();
        }
        messages.forEach(marshalledMessages::add);
        return this;
    }
Registers custom messages to be marshalled by the error handler.

<p>This method allows registering message instances for custom error responses.
If a custom JSON marshaller has already been set, calling this method will
result in an {@link IllegalStateException}.

@param messages The collection of messages to register
grpc/src/main/java/com/linecorp/armeria/server/grpc/UnframedGrpcErrorHandlerBuilder.java