Class: LAA::FeeCalculator::ResourceNotFound

Inherits:
ResponseError show all
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_sObject



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), message|
    message.concat("#{k} #{v}")
  end
end