Sha256: 87cefb97ca3e97cb5f686e1c0afaed91547116280419f144a1a571b872a29e48

Contents?: true

Size: 290 Bytes

Versions: 2

Compression:

Stored size: 290 Bytes

Contents

require 'faraday'
require 'trell/error'

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trell-0.0.4 lib/trell/response/raise_error.rb
trell-0.0.3 lib/trell/response/raise_error.rb