Skip to content

Commit

Permalink
add full response body to ruby_outlook_response result key
Browse files Browse the repository at this point in the history
  • Loading branch information
hspazio committed Feb 2, 2017
1 parent b853e3b commit aec9328
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ruby_outlook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ def make_api_call(method, url, token, params = nil, payload = nil)
end

if response.status >= 300
return JSON.dump({ 'ruby_outlook_error' => response.status})
error_info = response.body.empty? ? '' : JSON.parse(response.body)
return JSON.dump({
'ruby_outlook_error' => response.status,
'ruby_outlook_response' => error_info })
end

response.body
Expand Down

0 comments on commit aec9328

Please sign in to comment.