# File lib/rhc-common.rb, line 272 def self.print_response_err(response) puts "Problem reported from server. Response code was #{response.code}." if (!@mydebug) puts "Re-run with -d for more information." end exit_code = 1 if response.content_type == 'application/json' puts "JSON response:" begin json_resp = JSON.parse(response.body) exit_code = print_json_body(json_resp) rescue JSON::ParserError exit_code = 1 end elsif @mydebug puts "HTTP response from server is #{response.body}" end exit exit_code.nil? ? 666 : exit_code end