Sha256: a12cf432c072d08e830939fb4d0ff70d914a25fc2e500ca58e0c3d03df357e6f
Contents?: true
Size: 496 Bytes
Versions: 11
Compression:
Stored size: 496 Bytes
Contents
module Restly::Collection::ErrorHandling extend ActiveSupport::Concern def response_has_errors?(response=self.response) @response.status >= 400 || (parsed_response(response).is_a?(Hash) && (parsed_response(response)[:errors] || parsed_response(response)[:error])) end def set_errors_from_response(response = self.response) if (error = parsed_response(response)[:errors] || parsed_response(response)[:error]) @errors << error end replace [] end end
Version data entries
11 entries across 11 versions & 1 rubygems