Class: HorizonClient::ClientError
- Inherits:
-
Faraday::ClientError
- Object
- Faraday::ClientError
- HorizonClient::ClientError
- Defined in:
- lib/horizon_client.rb
Instance Method Summary collapse
-
#initialize(e) ⇒ ClientError
constructor
A new instance of ClientError.
Constructor Details
#initialize(e) ⇒ ClientError
Returns a new instance of ClientError.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/horizon_client.rb', line 12 def initialize(e) = e. if e.response.is_a?(Hash) body = e.response[:body] if body.is_a?(Hash) error = body['error'] if error.is_a?(Hash) += ": #{error['message']}" end end end super end |