jax-rs jersey: Exception Mapping for Enum bound FormParam
I am building a REST application, which is running on Glassfish 3, and having trouble handling the case when a parameter is bound to an enum: @FormParam("state") final State state So, State is just an enum, which contains different types of states. In case a value is submitted, that can not be parsed, a http 400 is returned. This basically is fine. However, I need to intercept that exception and return a custom response, which provides additional information to the client. (e.g. a json object containing a description: "state invalid"). I have bound parameters to my own classes and have been