@Test
  void httpNotFoundError() {
    server.enqueue(new MockResponse().setResponseCode(404));

    String url = "http://localhost:" + server.getPort() + "/";
    TestInterface api = Feign.builder().target(TestInterface.class, url);

    try {
      api.getBodyAsString();
      failBecauseExceptionWasNotThrown(FeignException.class);
    } catch (FeignException.NotFound e) {
      assertThat(e.status()).isEqualTo(404);
    }
  }
Shows exception handling isn't required to coerce 204 to null or empty
core/src/test/java/feign/FeignBuilderTest.java