Exception: Dnsimple::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/dnsimple/error.rb

Overview

RequestError is raised when an API request fails for an client, a server error or invalid request information.

Direct Known Subclasses

NotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_response) ⇒ RequestError

Returns a new instance of RequestError.



14
15
16
17
18
# File 'lib/dnsimple/error.rb', line 14

def initialize(http_response)
  @http_response = http_response
  @attribute_errors = attribute_errors_from(http_response)
  super(message_from(http_response))
end

Instance Attribute Details

#attribute_errorsObject (readonly)

Returns the value of attribute attribute_errors.



12
13
14
# File 'lib/dnsimple/error.rb', line 12

def attribute_errors
  @attribute_errors
end

#http_responseObject (readonly)

Returns the value of attribute http_response.



11
12
13
# File 'lib/dnsimple/error.rb', line 11

def http_response
  @http_response
end