From f874267c1e8596f61e49a87e91effc4e8181145c Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 2 Mar 2017 16:22:22 -0800 Subject: add debug long for non-JSON response we should probably raise (?) but this at least helps us debug. Signed-off-by: Lamont Granquist --- lib/chef/http/json_output.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 () # Author:: John Keiser () -# 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 -- cgit v1.2.1