Sha256: 773bda642720c346d1db2b2ad625a88d43b22aac37868664bb18752dd3958b88

Contents?: true

Size: 345 Bytes

Versions: 20

Compression:

Stored size: 345 Bytes

Contents

module Slack
  module Web
    module Faraday
      module Response
        class RaiseError < ::Faraday::Response::Middleware
          def on_complete(env)
            body = env.body
            return if body['ok']
            fail Slack::Web::Api::Error.new(body['error'], env.response)
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-bhe-0.5.4 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.8.1 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.8.0 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.9 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.8 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.7 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.6 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.5 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.4 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.3 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.2 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.1 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.7.0 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.6.0 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.5.4 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.5.3 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.5.2 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.5.1 lib/slack/web/faraday/response/raise_error.rb
slack-ruby-client-0.5.0 lib/slack/web/faraday/response/raise_error.rb