@Test void statusResponse() { Assertions .assertThatThrownBy(() -> { throw new InfluxException(new HttpException(errorResponse("Wrong query", 501))); }) .matches((Predicate<Throwable>) throwable -> ((InfluxException) throwable).status() == 501); }
public int status() { if (response != null) { return response.code(); } return 0; }
InfluxException extends RuntimeException { public int status() { if (response != null) { return response.code(); } return 0; } }
InfluxException extends RuntimeException { public int status() { if (response != null) { return response.code(); } return 0; } InfluxException(@Nullable final String message);  InfluxException(@Nullable final Throwable cause);  InfluxException(@Nullable final Response<?> cause); }
InfluxException extends RuntimeException { public int status() { if (response != null) { return response.code(); } return 0; } InfluxException(@Nullable final String message);  InfluxException(@Nullable final Throwable cause);  InfluxException(@Nullable final Response<?> cause); @Override String getMessage(); int reference(); int status(); @Nonnull JSONObject errorBody(); }
InfluxException extends RuntimeException { public int status() { if (response != null) { return response.code(); } return 0; } InfluxException(@Nullable final String message);  InfluxException(@Nullable final Throwable cause);  InfluxException(@Nullable final Response<?> cause); @Override String getMessage(); int reference(); int status(); @Nonnull JSONObject errorBody();  }