Sha256: 7bf162b8ff07f8662b6b712aa0abf71a2d472fc524b91a116adb53711fca1f92

Contents?: true

Size: 275 Bytes

Versions: 6

Compression:

Stored size: 275 Bytes

Contents

require "ribose/error"

module Ribose
  module Response
    class RaiseError < Faraday::Response::Middleware
      private

      def on_complete(response)
        if error = Ribose::Error.from_response(response)
          raise error
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ribose-0.4.1 lib/ribose/response/raise_error.rb
ribose-0.4.0 lib/ribose/response/raise_error.rb
ribose-0.3.2 lib/ribose/response/raise_error.rb
ribose-0.3.1 lib/ribose/response/raise_error.rb
ribose-0.3.0 lib/ribose/response/raise_error.rb
ribose-0.2.0 lib/ribose/response/raise_error.rb