micronaut-projects/micronaut-servlet

investigate why Http Server Tck ErrorHandlerTest fails

Closed this issue · 3 comments

For all 3 failures here, it seems the @Produces is ignored for the @Error handler methods, ie:

        @Error
        @Produces({"text/plain"})
        @Status(HttpStatus.OK)
        String localHandler(AnotherException throwable) {
            return throwable.getMessage();
        }

or

        @Error
        @Produces(io.micronaut.http.MediaType.TEXT_PLAIN)
        @Status(HttpStatus.OK)
        String localHandler(AnotherException throwable) {
            return throwable.getMessage();
        }

Has the correct response, but it isn't text-plain

Right, that looks like a bug.

@timyates can we close this?