Exception: Cryptopay::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Cryptopay::Error
- Defined in:
- lib/cryptopay/errors.rb
Direct Known Subclasses
ClientError, ConnectionError, ServerError, SignatureVerificationError
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 |