Skip to content

Commit

Permalink
Include the entire response in error message in case of reporting gen…
Browse files Browse the repository at this point in the history
…eration error. (#64979)

The toString of HttpResponse includes not just the status, but also all the other details.
  • Loading branch information
martijnvg committed Nov 25, 2020
1 parent f6bcdec commit 4801f7f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ private HttpResponse requestReportGeneration(String watchId, String attachmentId
HttpResponse response = httpClient.execute(request);
if (response.status() != 200) {
throw new ElasticsearchException("Watch[{}] reporting[{}] Error response when trying to trigger reporting generation " +
"host[{}], port[{}] method[{}], path[{}], status[{}]", watchId, attachmentId, request.host(),
request.port(), request.method(), request.path(), response.status());
"host[{}], port[{}] method[{}], path[{}], response[{}]", watchId, attachmentId, request.host(),
request.port(), request.method(), request.path(), response);
}

return response;
Expand Down

0 comments on commit 4801f7f

Please sign in to comment.