Sha256: 639764404dbd2e2224119249e938627219c3c47e883584e1f64a8030304a93c8

Contents?: true

Size: 546 Bytes

Versions: 14

Compression:

Stored size: 546 Bytes

Contents

require 'net/http'

module Fluent
  module SlackClient
    class Error < StandardError
      attr_reader :res, :req_params

      def initialize(res, req_params = {})
        @res        = res
        @req_params = req_params.dup
      end

      def message
        @req_params[:token] = '[FILTERED]' if @req_params[:token]
        "res.code:#{@res.code}, res.body:#{@res.body}, req_params:#{@req_params}"
      end

      alias :to_s :message
    end

    class ChannelNotFoundError < Error; end
    class NameTakenError < Error; end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
fluent-plugin-slack-stakater-0.6.8 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.7 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.6 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.5 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.4 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.3 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.2 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.1 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.6.0 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.5.5 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.5.4 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.5.3 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.5.2 lib/fluent/plugin/slack_client/error.rb
fluent-plugin-slack-0.5.1 lib/fluent/plugin/slack_client/error.rb