Exception: GdsApi::HTTPErrorResponse

Inherits:
BaseError
  • Object
show all
Defined in:
lib/gds_api/exceptions.rb

Overview

Superclass for all 4XX and 5XX errors

Direct Known Subclasses

HTTPClientError, HTTPServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message = nil, error_details = nil, request_body = nil) ⇒ HTTPErrorResponse



13
14
15
16
17
18
# File 'lib/gds_api/exceptions.rb', line 13

def initialize(code, message = nil, error_details = nil, request_body = nil)
  super(message)
  @code = code
  @error_details = error_details
  @request_body = request_body
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



11
12
13
# File 'lib/gds_api/exceptions.rb', line 11

def code
  @code
end

#error_detailsObject

Returns the value of attribute error_details.



11
12
13
# File 'lib/gds_api/exceptions.rb', line 11

def error_details
  @error_details
end