Skip to content

Commit

Permalink
Fix error messaging from prometheus. (#1029) (#1037)
Browse files Browse the repository at this point in the history
Signed-off-by: vamsi-amazon <[email protected]>
(cherry picked from commit 4a9cef3)

Co-authored-by: vamsi-amazon <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and vmmusings authored Nov 7, 2022
1 parent 0a4d92d commit a4c7cf7
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 a4c7cf7

Please sign in to comment.