Skip to content

Commit

Permalink
Adds the response body when an Exception occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbiehl committed Apr 26, 2016
1 parent 46c0330 commit 7c9796e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ecwid_api/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Error < StandardError; end;
class ResponseError < Error
def initialize(response)
if response.respond_to?(:reason_phrase)
super("#{response.reason_phrase} (#{response.status})")
super "#{response.reason_phrase} (#{response.status})\n#{response.body}"
else
super "The Ecwid API responded with an error (#{response.status})"
end
Expand Down

0 comments on commit 7c9796e

Please sign in to comment.