Exception: LogtoError::ResponseError
- Inherits:
-
LogtoError
- Object
- StandardError
- LogtoError
- LogtoError::ResponseError
- Defined in:
- lib/logto/core/errors.rb
Overview
The base class for response errors from Logto server.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Net::HTTPResponse?
The response object that caused this error.
Instance Method Summary collapse
-
#initialize(message, response: nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(message, response: nil) ⇒ ResponseError
Returns a new instance of ResponseError.
13 14 15 16 17 |
# File 'lib/logto/core/errors.rb', line 13 def initialize(, response: nil) raise ArgumentError, "response must be a Net::HTTPResponse or nil" unless response.nil? || response.is_a?(Net::HTTPResponse) super() @response = response end |
Instance Attribute Details
#response ⇒ Net::HTTPResponse?
The response object that caused this error.
10 11 12 |
# File 'lib/logto/core/errors.rb', line 10 def response @response end |