Skip to content

Commit

Permalink
Fix error messaging from prometheus.
Browse files Browse the repository at this point in the history
Signed-off-by: vamsi-amazon <[email protected]>
  • Loading branch information
vmmusings committed Nov 4, 2022
1 parent 3e30379 commit e74b331
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ private JSONObject readResponse(Response response) throws IOException {
}
} else {
throw new RuntimeException(
String.format("Request to Prometheus is Unsuccessful with : %s", response.message()));
String.format("Request to Prometheus is Unsuccessful with : %s", Objects.requireNonNull(
response.body(), "Response body can't be null").string()));
}
}

Expand Down

0 comments on commit e74b331

Please sign in to comment.