Skip to content

Commit 0774d6c

Browse files
committed
Added puts to request errors
1 parent f325320 commit 0774d6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/iugu/api_request.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ def self.send_request(method, url, data)
1616
rescue RestClient::ResourceNotFound
1717
raise ObjectNotFound
1818
rescue RestClient::UnprocessableEntity => ex
19+
puts JSON.parse(ex.response)
1920
raise RequestWithErrors.new JSON.parse(ex.response)['errors']
2021
rescue RestClient::BadRequest => ex
22+
puts JSON.parse(ex.response)
2123
raise RequestWithErrors.new JSON.parse(ex.response)['errors']
2224
end
2325

0 commit comments

Comments
 (0)