Skip to content

Commit

Permalink
Fix error messaging from prometheus. (opensearch-project#1029)
Browse files Browse the repository at this point in the history
Signed-off-by: vamsi-amazon <[email protected]>
  • Loading branch information
vmmusings authored Nov 4, 2022
1 parent 3e30379 commit 4a9cef3
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 4a9cef3

Please sign in to comment.