Exception: Legion::Extensions::Lakera::Helpers::Errors::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Legion::Extensions::Lakera::Helpers::Errors::ApiError
- Defined in:
- lib/legion/extensions/lakera/helpers/errors.rb
Direct Known Subclasses
AuthenticationError, InvalidRequestError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, error_type: nil, body: nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message = nil, status: nil, error_type: nil, body: nil) ⇒ ApiError
Returns a new instance of ApiError.
11 12 13 14 15 16 |
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 11 def initialize( = nil, status: nil, error_type: nil, body: nil) super() @status = status @error_type = error_type @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9 def body @body end |
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
9 10 11 |
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9 def error_type @error_type end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/legion/extensions/lakera/helpers/errors.rb', line 9 def status @status end |