title: FeignClient throws instead of returning ResponseEntity with error http status
body: <p>As I'm using <code>ResponseEntity&lt;T&gt;</code> as return value for my FeignClient method, I was expecting it to return a ResponseEntity with 400 status if it's what the server returns. But instead it throws a <code>FeignException</code>.</p>
  
  <p>How can I get a proper ResponseEntity instead of an Exception from FeignClient ?</p>
  
  <p>Here is my FeignClient:</p>
  
  <pre class="lang-java prettyprint-override"><code>@FeignClient(value = "uaa", configuration = OauthFeignClient.Conf.class)
  public interface OauthFeignClient {
  
      @RequestMapping(
              value = "/oauth/token",
              method = RequestMethod.POST,
              consumes = MULTIPART_FORM_DATA_VALUE,
              produces = APPLICATION_JSON_VALUE)
      ResponseEntity&lt;OauthTokenResponse&gt; token(Map&lt;String, ?&gt; formParams);
  
      class Conf {
  
          @Value("${oauth.client.password}")
          String oauthClientPassword;
  
          @Bean
          public Encoder feignFormEncoder() {
              return new SpringFormEncoder();
          }
  
          @Bean
          public Contract feignContract() {
              return new SpringMvcContract();
          }
  
          @Bean
          public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
              return new BasicAuthRequestInterceptor("web-client", oauthClientPassword);
          }
  
      }
  }
  </code></pre>
  
  <p>and here how I use it:</p>
  
  <pre class="lang-java prettyprint-override"><code>@PostMapping("/login")
  public ResponseEntity&lt;LoginTokenPair&gt; getTokens(@RequestBody @Valid LoginRequest userCredentials) {
      Map&lt;String, String&gt; formData = new HashMap&lt;&gt;();
  
      ResponseEntity&lt;OauthTokenResponse&gt; response = oauthFeignClient.token(formData);
  
      //code never reached if contacted service returns a 400
      ...
  }
  </code></pre>