title: Feign Client Error Handling
body: <p>I am using Feign Client,</p>
  
  <p>I have a Location service. So I created a client for my LocationService using FeignClient.</p>
  
  <pre><code>@FeignClient(url="http://localhost:9003/location/v1", name="location-service")
  public interface LocationControllerVOneClient {
  
      @RequestMapping(value = "/getMultipleLocalities", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, Locality&gt;&gt; getMultipleLocalities(List&lt;Integer&gt; localityIds);
  
      @RequestMapping(value = "/getMultipleCities", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, City&gt;&gt; getMultipleCities(List&lt;Integer&gt; cityIds);
  
      @RequestMapping(value = "/getMultipleStates", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, State&gt;&gt; getMultipleStates(List&lt;Integer&gt; stateIds);
  
      @RequestMapping(value = "/getMultipleCitiesName", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, String&gt;&gt; getMultipleCitiesName(MultiValueMap&lt;String, String&gt; formParams);
  
      @RequestMapping(value = "/getMultipleStatesName", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, String&gt;&gt; getMultipleStatesName(MultiValueMap&lt;String, String&gt; formParams);
  
      @RequestMapping(value = "/getMultipleLocalitiesName", method = RequestMethod.POST)
      public Response&lt;Map&lt;Integer, String&gt;&gt; getMultipleLocalitiesName(MultiValueMap&lt;String, String&gt; formParams);
  
  }
  </code></pre>
  
  <p>Now other services might call this LocationService via LocationClient.</p>
  
  <p>I want to do exception handling for this Feign Client(LocationClient) at a common place(i.e. I just donot want each caller to do this. This should be part of LocationClient). Exception Could be connection refused(if LocationService is down), timeout etc.</p>