Sha256: 765fff0af72b4c74a81e1709d7816132c25f070e560166959ad2d465bf4d274a
Contents?: true
Size: 459 Bytes
Versions: 9
Compression:
Stored size: 459 Bytes
Contents
require "faraday/response" require_relative "../error" module Redd # The module that contains middleware that alters the Faraday response. module Response # Faraday Middleware that raises an error if there's one. # @see Error class RaiseError < Faraday::Response::Middleware def on_complete(env) error = Redd::Error.from_response(env) fail error.new(env), env[:body] if error end end end end
Version data entries
9 entries across 9 versions & 1 rubygems