lib/footrest/http_error.rb in footrest-0.5.5 vs lib/footrest/http_error.rb in footrest-0.5.6

- old
+ new

@@ -32,10 +32,11 @@ rescue => e "[Unable to show headers: #{e}]" end def errors - JSON::pretty_generate(JSON::parse(@body)["errors"]) + parsed_body = JSON::parse(@body) + JSON::pretty_generate(parsed_body["errors"] || parsed_body) rescue @body end def status_message