lib/apitool/client/apitool_client.rb in apitool-client-0.0.5 vs lib/apitool/client/apitool_client.rb in apitool-client-0.0.6
- old
+ new
@@ -75,10 +75,10 @@
@response = _response
@request = _request
@result = _result
log = "#{result} - #{request[:method].upcase} - #{request[:url]} - payload[#{request[:payload] || ''}]"
- if response.present? and (response.kind_of? Array and response[0].has_key?(:message)) || (response.has_key?(:errors))
+ if response.present? and (response.kind_of? Array and response[0].has_key?(:message)) || (response.kind_of? Hash and response.has_key?(:errors))
log = log + " - error['#{response.inspect}']"
end
logger.info log
end