Exception: JetstreamBridge::RetryExhausted
- Defined in:
- lib/jetstream_bridge/errors.rb
Overview
Retry errors
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#original_error ⇒ Object
readonly
Returns the value of attribute original_error.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, attempts: 0, original_error: nil, context: {}) ⇒ RetryExhausted
constructor
A new instance of RetryExhausted.
Constructor Details
#initialize(message = nil, attempts: 0, original_error: nil, context: {}) ⇒ RetryExhausted
Returns a new instance of RetryExhausted.
82 83 84 85 86 87 88 89 |
# File 'lib/jetstream_bridge/errors.rb', line 82 def initialize( = nil, attempts: 0, original_error: nil, context: {}) @attempts = attempts @original_error = original_error super( || "Failed after #{attempts} attempts: #{original_error&.message}", context: context.merge(attempts: attempts).compact ) end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
80 81 82 |
# File 'lib/jetstream_bridge/errors.rb', line 80 def attempts @attempts end |
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
80 81 82 |
# File 'lib/jetstream_bridge/errors.rb', line 80 def original_error @original_error end |