Exception: Datadog::Core::Transport::HTTP::API::Spec::EndpointNotDefinedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/datadog/core/transport/http/api/spec.rb

Overview

Raised when an endpoint is invoked on an API that did not define that endpoint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_name, spec) ⇒ EndpointNotDefinedError

Returns a new instance of EndpointNotDefinedError.



16
17
18
19
20
21
# File 'lib/datadog/core/transport/http/api/spec.rb', line 16

def initialize(endpoint_name, spec)
  @spec = spec
  @endpoint_name = endpoint_name

  super(message)
end

Instance Attribute Details

#endpoint_nameObject (readonly)

Returns the value of attribute endpoint_name.



14
15
16
# File 'lib/datadog/core/transport/http/api/spec.rb', line 14

def endpoint_name
  @endpoint_name
end

#specObject (readonly)

Returns the value of attribute spec.



14
15
16
# File 'lib/datadog/core/transport/http/api/spec.rb', line 14

def spec
  @spec
end

Instance Method Details

#messageObject



23
24
25
# File 'lib/datadog/core/transport/http/api/spec.rb', line 23

def message
  "No #{endpoint_name} endpoint is defined for API specification!"
end