Sha256: 2c4de74d3ccbb5453d4f2aaa5feee0665be2df0a400252321e64c05ca9216f21
Contents?: true
Size: 375 Bytes
Versions: 14
Compression:
Stored size: 375 Bytes
Contents
require 'faraday' module AirbrakeAPI module Middleware class RaiseResponseError < Faraday::Response::Middleware def on_complete(env) raise AirbrakeError.new('No results found.') if env[:body].nil? if env[:body].errors && env[:body].errors.error raise AirbrakeError.new(env[:body].errors.error) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems