Sha256: 32134f54b2b1349f33a67c23ad3050838e59499b01091c9b9497f52b115eb797
Contents?: true
Size: 460 Bytes
Versions: 4
Compression:
Stored size: 460 Bytes
Contents
require 'zendesk_api/error' module ZendeskAPI module Middleware module Response class RaiseError < Faraday::Response::RaiseError def on_complete(env) case env[:status] when 404 raise Error::RecordNotFound.new(env) when 422 raise Error::RecordInvalid.new(env) when 400...600 raise Error::NetworkError.new(env) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems