Sha256: 7c3c86f01cdb91e516f8d718ead3c783b2d2f5810f76777834eab90c659eec33

Contents?: true

Size: 558 Bytes

Versions: 12

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true
module Slack
  module Web
    module Api
      module Errors
        class SlackError < ::Faraday::Error
          attr_reader :response

          def initialize(message, response = nil)
            super message
            @response = response
          end

          def error
            response.body.error
          end

          def errors
            response.body.errors
          end

          def response_metadata
            response.body.response_metadata
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-2.3.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-2.2.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-2.1.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-2.0.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-1.1.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-1.0.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-0.17.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-0.16.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-0.15.1 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-0.15.0 lib/slack/web/api/errors/slack_error.rb
slack-ruby-client-0.14.6 lib/slack/web/api/errors/slack_error.rb