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-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/logstash-core-5.6.4-java/lib/logstash/api/errors.rb
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/logstash-core-5.0.0-java/lib/logstash/api/errors.rb
logstash-core-5.6.10-java lib/logstash/api/errors.rb
logstash-core-6.3.0-java lib/logstash/api/errors.rb
logstash-core-6.2.4-java lib/logstash/api/errors.rb
logstash-core-5.6.9-java lib/logstash/api/errors.rb
logstash-core-6.2.3-java lib/logstash/api/errors.rb
logstash-core-6.1.4-java lib/logstash/api/errors.rb
logstash-core-5.6.8-java lib/logstash/api/errors.rb
logstash-core-6.2.2-java lib/logstash/api/errors.rb
logstash-core-6.2.1-java lib/logstash/api/errors.rb
logstash-core-6.2.0-java lib/logstash/api/errors.rb
logstash-core-6.1.3-java lib/logstash/api/errors.rb
logstash-core-5.6.7-java lib/logstash/api/errors.rb
logstash-core-6.1.2-java lib/logstash/api/errors.rb
logstash-core-5.6.6-java lib/logstash/api/errors.rb
logstash-core-6.1.1-java lib/logstash/api/errors.rb
logstash-core-6.1.0-java lib/logstash/api/errors.rb
logstash-core-6.0.1-java lib/logstash/api/errors.rb
logstash-core-5.6.5-java lib/logstash/api/errors.rb