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-5.1.2-java lib/logstash/api/errors.rb
logstash-core-5.1.1.1-java lib/logstash/api/errors.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/api/errors.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/api/errors.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/api/errors.rb
logstash-core-5.0.2-java lib/logstash/api/errors.rb
logstash-core-5.0.1-java lib/logstash/api/errors.rb
logstash-core-5.0.0-java lib/logstash/api/errors.rb
logstash-core-5.0.0.pre.rc1-java lib/logstash/api/errors.rb
logstash-core-5.0.0.pre.beta1-java lib/logstash/api/errors.rb