On 05/06/2016 21:20, Romain Manni-Bucau wrote:
Did you try an ExceptionMapper? It could handle 404 and delegate others.
tried these two without any result:
@Provider
public class EntityNotFoundMapper
implements ExceptionMapper<EntityNotFoundException> {
@Override
public Response toResponse(EntityNotFoundException e) {
return Response.status(Response.Status.NOT_FOUND).build();
}
}
@Provider
public class WebApplicationExceptionHandler implements
ExceptionMapper<WebApplicationException> {
@Override
public Response toResponse(WebApplicationException e) {
return Response.status(Response.Status.NOT_FOUND).build();
}
}