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

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

<p>This method registers specific 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 message instances to register
grpc/src/main/java/com/linecorp/armeria/server/grpc/UnframedGrpcErrorHandlerBuilder.java