Method: Chain::APIError#initialize
- Defined in:
- lib/chain/errors.rb
#initialize(body, response) ⇒ APIError
Returns a new instance of APIError.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/chain/errors.rb', line 49 def initialize(body, response) self.code = body['code'] self. = body['message'] self.detail = body['detail'] self.temporary = body['temporary'] self.response = response self.request_id = response['Chain-Request-ID'] if response super self.class.(code, , detail, request_id) end |