Exception: WorkOS::Error
- Inherits:
-
StandardError
- Object
- StandardError
- WorkOS::Error
- Defined in:
- lib/workos/errors.rb
Overview
Base class for all SDK errors.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Instance Method Summary collapse
-
#initialize(message:, http_status: nil, request_id: nil, code: nil, body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message:, http_status: nil, request_id: nil, code: nil, body: nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 |
# File 'lib/workos/errors.rb', line 9 def initialize(message:, http_status: nil, request_id: nil, code: nil, body: nil) super() @http_status = http_status @request_id = request_id @code = code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/workos/errors.rb', line 7 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/workos/errors.rb', line 7 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
7 8 9 |
# File 'lib/workos/errors.rb', line 7 def http_status @http_status end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
7 8 9 |
# File 'lib/workos/errors.rb', line 7 def request_id @request_id end |