Exception: Cryptopay::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cryptopay/errors.rb

Class Method Summary collapse

Class Method Details

.from_response(res) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/cryptopay/errors.rb', line 5

def self.from_response(res)
  case res.status
  when 400..499
    ClientError.from_response(res)
  when 500..599
    ServerError.from_response(res)
  end
end