Sha256: 0ec98c983f7d66e1d64e0e0863f50ab628f20c631d1eb496db600d1c22a18082

Contents?: true

Size: 692 Bytes

Versions: 25

Compression:

Stored size: 692 Bytes

Contents

module Datadog
  module Transport
    # Defines abstract response for transport operations
    module Response
      def payload
        nil
      end

      def ok?
        nil
      end

      def unsupported?
        nil
      end

      def not_found?
        nil
      end

      def client_error?
        nil
      end

      def server_error?
        nil
      end

      def internal_error?
        nil
      end
    end

    # A generic error response for internal errors
    class InternalErrorResponse
      include Response

      attr_reader :error

      def initialize(error)
        @error = error
      end

      def internal_error?
        true
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
ddtrace-0.37.0 lib/ddtrace/transport/response.rb
ddtrace-0.36.0 lib/ddtrace/transport/response.rb
ls-trace-0.1.2 lib/ddtrace/transport/response.rb
ddtrace-0.35.2 lib/ddtrace/transport/response.rb
ddtrace-0.35.1 lib/ddtrace/transport/response.rb
ddtrace-0.35.0 lib/ddtrace/transport/response.rb
ddtrace-0.34.2 lib/ddtrace/transport/response.rb
ddtrace-0.34.1 lib/ddtrace/transport/response.rb
ddtrace-0.34.0 lib/ddtrace/transport/response.rb
ddtrace-0.33.1 lib/ddtrace/transport/response.rb
ddtrace-0.33.0 lib/ddtrace/transport/response.rb
ddtrace-0.32.0 lib/ddtrace/transport/response.rb
ddtrace-0.31.1 lib/ddtrace/transport/response.rb
ddtrace-0.31.0 lib/ddtrace/transport/response.rb
ddtrace-0.30.1 lib/ddtrace/transport/response.rb
ddtrace-0.30.0 lib/ddtrace/transport/response.rb
ddtrace-0.29.1 lib/ddtrace/transport/response.rb
ddtrace-0.26.1 lib/ddtrace/transport/response.rb
ls-trace-0.1.1 lib/ddtrace/transport/response.rb
ddtrace-0.29.0 lib/ddtrace/transport/response.rb