Exception: FulfilApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- FulfilApi::Error
- Includes:
- Notifiable
- Defined in:
- lib/fulfil_api/error.rb,
lib/fulfil_api/error/notifiable.rb
Overview
The Error is the base class for all FulfilApi errors, also used for generic or unexpected errors.
Raising any of them publishes an ActiveSupport::Notifications event, so an application can report the failure to its APM without rescuing every call into the gem. See Notifiable and on_error.
Direct Known Subclasses
AccessToken::TypeInvalid, HttpError, Relation::Batchable::RetryLimitExceeded, Resource::ModelNameMissing, Resource::NotFound, TplClient::ConfigurationError
Defined Under Namespace
Modules: Notifiable
Constant Summary
Constants included from Notifiable
Notifiable::EVENT_NAME, Notifiable::REENTRANCY_KEY
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(message, details: nil) ⇒ Error
constructor
A new instance of Error.
- #message ⇒ String
Methods included from Notifiable
Constructor Details
#initialize(message, details: nil) ⇒ Error
Returns a new instance of Error.
17 18 19 20 |
# File 'lib/fulfil_api/error.rb', line 17 def initialize(, details: nil) @details = details super() end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
13 14 15 |
# File 'lib/fulfil_api/error.rb', line 13 def details @details end |
Instance Method Details
#message ⇒ String
23 24 25 26 27 28 |
# File 'lib/fulfil_api/error.rb', line 23 def = return "[FulfilApi::Error] #{}" if "[FulfilApi::Error] #{super}" end |