Sha256: ff155d593a02089dc5388b380261657cb3814f610749158d6a1ff0a08c5f1b2b
Contents?: true
Size: 368 Bytes
Versions: 7
Compression:
Stored size: 368 Bytes
Contents
module RockRMS class Error < StandardError; end end require 'faraday' module FaradayMiddleware class RockRMSErrorHandler < Faraday::Response::Middleware ERROR_STATUSES = 400..600 def on_complete(env) case env[:status] when ERROR_STATUSES raise RockRMS::Error, "#{env[:status]}: #{env[:body]} #{env[:url]}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems