[jboss-jira] [JBoss JIRA] (WFLY-1414) Undertow suppresses JAX-RS error message
Juergen Zimmermann (JIRA)
jira-events at lists.jboss.org
Wed May 29 09:51:54 EDT 2013
Juergen Zimmermann created WFLY-1414:
----------------------------------------
Summary: Undertow suppresses JAX-RS error message
Key: WFLY-1414
URL: https://issues.jboss.org/browse/WFLY-1414
Project: WildFly
Issue Type: Bug
Components: REST, Web (Undertow)
Affects Versions: 8.0.0.Alpha2
Reporter: Juergen Zimmermann
Assignee: Stuart Douglas
I'm using a snapshot of WildFly 8.0.0.Alpha2 containing Undertow 1.0.0.Alpha17.
My RESTful Web Service in a war is using an ExceptionMapper (see below) which converts an exception into a 404 error code and also an error message. Now I try to submit a GET request resulting in an exception to be mapped.
I get the 404 error code, but NOT the error message. Instead I'm getting the contents of the error page which is declared in web.xml for a 404 error. In EAP 6.1.Beta I'm getting the error message produced by the exception mapper.
The exception mapper class:
@Provider
@ApplicationScoped
public class NotFoundExceptionMapper implements ExceptionMapper<NotFoundException> {
@Override
public Response toResponse(NotFoundException e) {
final String msg = e.getMessage();
final Response response = Response.status(NOT_FOUND)
.type(TEXT_PLAIN)
.entity(msg)
.build();
return response;
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list