Exception: ApiErrorResponseException

Inherits:
ApiException
  • Object
show all
Defined in:
lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb

Instance Attribute Summary collapse

Attributes inherited from ApiException

#response_body, #status_code

Instance Method Summary collapse

Methods inherited from ApiException

#message, #to_s

Constructor Details

#initialize(status_code, response_body, errors = []) ⇒ ApiErrorResponseException

Returns a new instance of ApiErrorResponseException.



7
8
9
10
# File 'lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb', line 7

def initialize(status_code, response_body, errors = [])
  super(status_code, response_body)
  @errors = errors.any? ? errors : []
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



5
6
7
# File 'lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb', line 5

def errors
  @errors
end

Instance Method Details

#get_errorsObject



12
13
14
# File 'lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb', line 12

def get_errors
  @errors
end