Exception: PCPServerSDK::Errors::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

The constructor

Parameters:



16
17
18
19
# File 'lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb', line 16

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

Instance Attribute Details

#errorsArray<PCPServerSDK::Models::APIError> (readonly)

The errors

Returns:



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

def errors
  @errors
end

Instance Method Details

#get_errorsObject



21
22
23
# File 'lib/PCP-server-Ruby-SDK/errors/api_error_response_exception.rb', line 21

def get_errors
  @errors
end