lib/peatio/bitgo/client.rb in peatio-bitgo-2.6.8 vs lib/peatio/bitgo/client.rb in peatio-bitgo-3.1.0
- old
+ new
@@ -36,10 +36,10 @@
args.last['Accept'] = 'application/json'
args.last['Authorization'] = 'Bearer ' + @access_token
response = Faraday.send(verb, *args)
- response.assert_success!
+ response.assert_2xx!
response = JSON.parse(response.body)
response['error'].tap { |error| raise ResponseError.new(error) if error }
response
rescue Faraday::Error => e
if e.is_a?(Faraday::ConnectionFailed) || e.is_a?(Faraday::TimeoutError)