Class: LAA::FeeCalculator::ResourceNotFound
- Inherits:
-
ResponseError
- Object
- Faraday::ClientError
- ClientError
- ResponseError
- LAA::FeeCalculator::ResourceNotFound
- Defined in:
- lib/laa/fee_calculator/errors.rb
Overview
raised when API response is not found: 404: e.g. body { “detail”: “Not found.” } TODO: consider raising for empty results i.e. results: [] ??
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
27 28 29 30 31 32 |
# File 'lib/laa/fee_calculator/errors.rb', line 27 def to_s h = JSON.parse(response[:body]) h.each_with_object(+'') do |(k, v), | .concat("#{k} #{v}") end end |