Sha256: a2ddb9608e1108191bcbfae272c88d269e05461449abf3f66af0a30b2f6b88bb
Contents?: true
Size: 519 Bytes
Versions: 7
Compression:
Stored size: 519 Bytes
Contents
module QuickTravel class AdapterError < StandardError attr_reader :response def initialize(response) @response = if response.is_a? String { 'error' => response } else response.parsed_response end error_message = @response.fetch('error', "We're sorry, but something went wrong. Please call us.") super(error_message) end def error_type @response.fetch('error_type', 'unspecified') end end end
Version data entries
7 entries across 7 versions & 1 rubygems