Exception: OracleBMC::Errors::ServiceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/oraclebmc/errors.rb

Overview

The base error for all requests that return error responses from the service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(statusCode, serviceCode, request_id, message) ⇒ ServiceError

Returns a new instance of ServiceError.



24
25
26
27
28
29
30
# File 'lib/oraclebmc/errors.rb', line 24

def initialize(statusCode, serviceCode, request_id, message)
  super message

  @statusCode = statusCode
  @serviceCode = serviceCode
  @request_id = request_id
end

Instance Attribute Details

#request_idString (readonly)

The request ID, taken from the opc-request-id header.

Returns:

  • (String)


22
23
24
# File 'lib/oraclebmc/errors.rb', line 22

def request_id
  @request_id
end

#serviceCodeString (readonly)

A service-specific error code

Returns:

  • (String)


17
18
19
# File 'lib/oraclebmc/errors.rb', line 17

def serviceCode
  @serviceCode
end

#statusCodeInteger (readonly)

HTTP status code (such as 200 or 404)

Returns:

  • (Integer)


12
13
14
# File 'lib/oraclebmc/errors.rb', line 12

def statusCode
  @statusCode
end