lib/after_ship/core/error_handler.rb
# Check the meta code of the response. If it isn't 200 or 201, raise an
# error.
#
# @param  meta          [Hash]
# @option meta :code    [Fixnum]
# @option meta :message [String, nil]
# @option meta :type    [String, nil]
Check the meta code of the response. If it isn't 200 or 201, raise an
error.
Check the meta code of the response . If it isn ' t 200 or 201 raise an error .
def check(meta)
      code = meta.fetch(:code)
      return if SUCCESS_CODES.include?(code)
      error_class = error_class_for(code)
      fail error_class, meta[:message]
    end
def check ( meta ) code = meta . fetch ( :code ) return if SUCCESS_CODES . include? ( code ) error_class = error_class_for ( code ) fail error_class , meta [ :message ] end
Check the meta code of the response.
Check the meta code of the response .
meta
None
<not_specific>
None