Exception: Roistat::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Roistat::Error
- Defined in:
- sig/roistat.rbs,
lib/roistat/errors.rb
Direct Known Subclasses
AccessDeniedError, AuthenticationError, AuthorizationError, ConfigurationError, RateLimitError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
Instance Method Summary collapse
-
#initialize(message = nil, code: nil, http_status: nil, response_body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, code: nil, http_status: nil, response_body: nil) ⇒ Error
Returns a new instance of Error.
6 7 8 9 10 11 |
# File 'lib/roistat/errors.rb', line 6 def initialize( = nil, code: nil, http_status: nil, response_body: nil) @code = code @http_status = http_status @response_body = response_body super( || code || self.class.name) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/roistat/errors.rb', line 4 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
4 5 6 |
# File 'lib/roistat/errors.rb', line 4 def http_status @http_status end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
4 5 6 |
# File 'lib/roistat/errors.rb', line 4 def response_body @response_body end |