Sha256: 5cc03c9d01c13291f5f75f35bbb4b5a6ef1e43b64e05c25cfa0675b061316adf

Contents?: true

Size: 435 Bytes

Versions: 170

Compression:

Stored size: 435 Bytes

Contents

# encoding: utf-8
module LogStash
  module Api
    class ApiError < StandardError;
      def initialize(message = nil)
        super(message || "Api Error")
      end

      def status_code
        500
      end

      def to_hash
        { :message => to_s }
      end
    end

    class NotFoundError < ApiError
      def initialize
        super("Not Found")
      end

      def status_code
        404
      end
    end
  end
end

Version data entries

170 entries across 167 versions & 12 rubygems

Version Path
logstash-core-6.8.23-java lib/logstash/api/errors.rb
logstash-core-6.8.22-java lib/logstash/api/errors.rb
logstash-core-6.8.21-java lib/logstash/api/errors.rb
logstash-core-6.8.20-java lib/logstash/api/errors.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-core-6.8.19-java lib/logstash/api/errors.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-core-6.8.18-java lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-core-6.8.17-java lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb