logstash-plugins / logstash-filter-http

HTTP Filter Plugin for Logstash
Apache License 2.0
12 stars 29 forks source link

Unhelpful error message when body is hash and body_format is text #20

Open TheVastyDeep opened 4 years ago

TheVastyDeep commented 4 years ago

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"}