title: Customization of Spring ConversionFailedException error HTTP status
body: <p>I have an enum class:</p>
  
  <pre><code>class enum Type {
     LOCAL, REMOTE
  }
  </code></pre>
  
  <p>I have an API that accepts the enum as a GET parameter </p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, location="item", params = "type")
  public Item[] get(Type type) {
  ...
  </code></pre>
  
  <p>When a client calls the API with valid values, like <code>GET /item?type=LOCAL</code> or <code>GET /item?type=REMOTE</code> it works fine. If the client supplies invalid value for <code>type</code>, e.g. <code>GET /item?type=INVALID_TYPE</code>, then Spring generates <code>500 Internal Server Error</code>. I would like to turn it into <code>400 Bad Request</code> validation error, potentially adding useful information for the client. I prefer to reuse the built type converter since in works just fine, just want to change a type of error HTTP thrown with minimum changes.</p>