@Test void errorBody() { Assertions .assertThatThrownBy(() -> { Response<Object> response = errorResponse("Wrong query", 501, 15, "{\"error\": \"error-body\"}"); throw new InfluxException(new HttpException(response)); }) .matches((Predicate<Throwable>) throwable -> ((InfluxException) throwable).errorBody().toString().equals("{\"error\":\"error-body\"}")); }
@Nonnull public JSONObject errorBody() { return errorBody; }
InfluxException extends RuntimeException { @Nonnull public JSONObject errorBody() { return errorBody; } }
InfluxException extends RuntimeException { @Nonnull public JSONObject errorBody() { return errorBody; } InfluxException(@Nullable final String message);  InfluxException(@Nullable final Throwable cause);  InfluxException(@Nullable final Response<?> cause); }
InfluxException extends RuntimeException { @Nonnull public JSONObject errorBody() { return errorBody; } 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 { @Nonnull public JSONObject errorBody() { return errorBody; } 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();  }