novie-core/src/main/java/com/groupon/novie/internal/controllers/ApiController.java
@ExceptionHandler(InvalidParameterException.class)
    @ResponseBody
    public ResponseEntity<String> handleControllerException(InvalidParameterException exception) {
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.TEXT_PLAIN);
        return new ResponseEntity<String>(exception.getMessage(), headers, HttpStatus.BAD_REQUEST);
    }
@ExceptionHandler(InvalidParameterException.class)
    @ResponseBody
    public ResponseEntity<String> handleControllerException(InvalidParameterException exception) {
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.TEXT_PLAIN);
        return new ResponseEntity<String>(exception.getMessage(), headers, HttpStatus.BAD_REQUEST);
    }
@ ExceptionHandler ( InvalidParameterException . class ) @ ResponseBody public ResponseEntity < String > handleControllerException ( InvalidParameterException exception ) { HttpHeaders headers = new HttpHeaders ( ) ; headers . setContentType ( MediaType . TEXT_PLAIN ) ; return new ResponseEntity < String > ( exception . getMessage ( ) , headers , HttpStatus . BAD_REQUEST ) ; }
<p>
Handles {@link InvalidParameterException} generated by the controller
itself when receives an invalid parameter.
</p>

@param exception of type {@link InvalidParameterException}
@return A {@link ResponseEntity} with the {@link HttpStatus#BAD_REQUEST}
code and a message describing the error itself.
<p > Handles { @link InvalidParameterException } generated by the controller itself when receives an invalid parameter . < / p >