module Revolut::Api::Errors

Constants

MAPPING

Public Instance Methods

error?(response) click to toggle source
# File lib/revolut/api/errors.rb, line 11
def error?(response)
  if response.is_a?(Hash) && response.has_key?("message")
    message   =   response.fetch("message", nil)
    ::Revolut::Api::Errors::MAPPING.fetch(message, nil)&.call
  end
end