diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-02 16:22:22 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-03-02 16:22:22 -0800 |
commit | f874267c1e8596f61e49a87e91effc4e8181145c (patch) | |
tree | aff821bf65aaa3f52be436f3aa9c7e24ca0d5340 /lib/chef/http | |
parent | 46d19a502fb8824fa3fccf4535fcfa226c4e9473 (diff) | |
download | chef-f874267c1e8596f61e49a87e91effc4e8181145c.tar.gz |
add debug long for non-JSON response
we should probably raise (?) but this at least helps us debug.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/json_output.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/http/json_output.rb b/lib/chef/http/json_output.rb index 6053c38a56..180f9edf65 100644 --- a/lib/chef/http/json_output.rb +++ b/lib/chef/http/json_output.rb @@ -1,7 +1,7 @@ #-- # Author:: Daniel DeLeo (<dan@chef.io>) # Author:: John Keiser (<jkeiser@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2017, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -61,6 +61,7 @@ class Chef [http_response, rest_request, return_value] else Chef::Log.debug("Expected JSON response, but got content-type '#{http_response['content-type']}'") + Chef::Log.debug("Response body contains:\n#{http_response.body}") return [http_response, rest_request, http_response.body.to_s] end end |