From eb63402a10500c3bbf4db73a741cb0aeb8d3953a Mon Sep 17 00:00:00 2001 From: "amitav.mohanty" Date: Sun, 3 Nov 2019 21:45:26 +0530 Subject: [PATCH] Print complete response body along with response code for BadResponseCodeError --- lib/logstash/outputs/elasticsearch/http_client/pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstash/outputs/elasticsearch/http_client/pool.rb b/lib/logstash/outputs/elasticsearch/http_client/pool.rb index 467141eaf..b808fb54e 100644 --- a/lib/logstash/outputs/elasticsearch/http_client/pool.rb +++ b/lib/logstash/outputs/elasticsearch/http_client/pool.rb @@ -12,7 +12,7 @@ def initialize(response_code, url, request_body, response_body) end def message - "Got response code '#{response_code}' contacting Elasticsearch at URL '#{@url}'" + "Got response code '#{response_code}' contacting Elasticsearch at URL '#{@url}'. Full response: '#{response_body}'" end end class HostUnreachableError < Error;