logstash-plugins/logstash-filter-http

Unhelpful error message when body is hash and body_format is text

TheVastyDeep opened this issue · 0 comments

In 7.3.2, if the body option is a hash and the body_format is set to text then the resulting error message is not particularly helpful.

http { body => { "foo" => "bar" } body_format => "text" url => "http://google.com/" verb=> "GET" }

results in

[ERROR][logstash.filters.http    ] error during HTTP request {:url=>"http://google.com/", :body=>{"foo"=>"bar"}, :client_error=>"undefined method `encoding' for {\"foo\"=>\"bar\"}:Hash"}