Created
January 15, 2015 08:24
-
-
Save ksahnine/28a8a7a423ca8990365d to your computer and use it in GitHub Desktop.
Dropwizard - Exception manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IOExceptionMapper implements ExceptionMapper<IOException> { | |
public Response toResponse(IOException exception) { | |
return Response.serverError().entity("{ \"message\": \"" + exception.toString() + "\"}").build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment