On 01/09/14 18:24, las wrote:
Yes, that worked, didn't think of that, my bad.
I found another issue, where only for ClientErrorException, i need to set
header whereas for other types, i dont have to.
return Response.status(Response.Status.NOT_FOUND).header("Content-Type",
"application/json")
Can you clarify please ? Why do you need to set this header at all ?
Regarding your question about ServerErrorException, JAX-RS 2.0
introduces few specific exception classes representing individual well
known errors like 500 (InternalServerErrorException) and exceptions like
ServerErrorException which can represent all of 500+ errors.
For ex, you can use WebApplicationException(500) (the 'legacy' style),
InternalServerErrorException, and ServerErrorException to represent 500
HTH, Sergey
--
View this message in context:
http://cxf.547215.n5.nabble.com/Avoid-stacktrace-in-response-when-error-occurs-tp5748315p5748351.html
Sent from the cxf-user mailing list archive at Nabble.com.