@Override
    public Object intercept(InvocationContext invocationContext, Chain chain) throws Exception {
      Response response = invocationContext.response();
      if (300 <= response.status()) {
        if (String.class.equals(invocationContext.returnType())) {
          String body = Util.toString(response.body().asReader(Util.UTF_8));
          response.close();
          return body;
        }
      }
      return chain.next(invocationContext);
    }
when you must parse a 2xx status to determine if the operation succeeded or not.
core/src/test/java/feign/FeignTest.java