I'm having Controller which can throw my Custom Exception.
public Response fetch(final String id) throws MyException {
return Response.ok().entity(custonService.fetch(id)).build();
}
I want to handle that exception and set response status as bad request with custom message as it happen in spring with the help of ExceptionHandler.
I saw CheckedProvider but couldn't find how to set response status and message in case of exception.
Is there a way to do so?
I'm new to Guice, please help.