Exception: ForestAdminAgent::Http::Exceptions::BusinessError
- Inherits:
-
StandardError
- Object
- StandardError
- ForestAdminAgent::Http::Exceptions::BusinessError
- Defined in:
- lib/forest_admin_agent/http/Exceptions/business_error.rb
Overview
Parent class for all business errors This is the base class that all specific error types inherit from
Direct Known Subclasses
BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, UnprocessableError
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(message = nil, details: {}, cause: nil) ⇒ BusinessError
constructor
A new instance of BusinessError.
-
#name ⇒ Object
Returns the name of the error class.
Constructor Details
#initialize(message = nil, details: {}, cause: nil) ⇒ BusinessError
Returns a new instance of BusinessError.
9 10 11 12 13 |
# File 'lib/forest_admin_agent/http/Exceptions/business_error.rb', line 9 def initialize( = nil, details: {}, cause: nil) super() @details = details || {} @cause = cause end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
7 8 9 |
# File 'lib/forest_admin_agent/http/Exceptions/business_error.rb', line 7 def cause @cause end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
7 8 9 |
# File 'lib/forest_admin_agent/http/Exceptions/business_error.rb', line 7 def details @details end |
Instance Method Details
#name ⇒ Object
Returns the name of the error class
16 17 18 |
# File 'lib/forest_admin_agent/http/Exceptions/business_error.rb', line 16 def name self.class.name.split('::').last end |