Exception: WorkOS::WorkOSError
- Inherits:
-
StandardError
- Object
- StandardError
- WorkOS::WorkOSError
- Extended by:
- T::Sig
- Defined in:
- lib/workos/errors.rb
Overview
rubocop:disable Style/Documentation
Direct Known Subclasses
Instance Attribute Summary collapse
-
#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: nil, http_status: nil, request_id: nil) ⇒ WorkOSError
constructor
A new instance of WorkOSError.
- #to_s ⇒ Object
Constructor Details
#initialize(message: nil, http_status: nil, request_id: nil) ⇒ WorkOSError
Returns a new instance of WorkOSError.
19 20 21 22 23 |
# File 'lib/workos/errors.rb', line 19 def initialize(message: nil, http_status: nil, request_id: nil) = @http_status = http_status @request_id = request_id end |
Instance Attribute Details
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
9 10 11 |
# File 'lib/workos/errors.rb', line 9 def http_status @http_status end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
10 11 12 |
# File 'lib/workos/errors.rb', line 10 def request_id @request_id end |
Instance Method Details
#to_s ⇒ Object
26 27 28 29 30 |
# File 'lib/workos/errors.rb', line 26 def to_s status_string = @http_status.nil? ? '' : "Status #{@http_status}, " id_string = @request_id.nil? ? '' : " - request ID: #{@request_id}" "#{status_string}#{@message}#{id_string}" end |