confluentinc / kafka-rest

Confluent REST Proxy for Kafka
https://docs.confluent.io/current/kafka-rest/docs/index.html
Other
38 stars 643 forks source link

Make sure that ErrorMessage is intepret as json type in response writer #1183

Closed trnguyencflt closed 1 year ago

trnguyencflt commented 1 year ago

As the title says. The reason is that without explicit MediaType, we might encounter the below error with OPTIONS request

org.glassfish.jersey.message.internal.MessageBodyProviderNotFoundException: MessageBodyWriter not found for media type=text/plain, type=class io.confluent.rest.entities.ErrorMessage, genericType=class io.confluent.rest.entities.ErrorMessage