Exception: Insika::CircuitOpenError
- Defined in:
- lib/insika/errors.rb
Overview
The circuit breaker refused the turn WITHOUT touching the provider (WS3):
the (tenant, provider/model) saw after failures within within seconds.
Typed + retryable — the envelope reads circuit_open + retry_after
(seconds until the cooldown lets a half-open trial through).
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
- #classification ⇒ Object
-
#initialize(message = nil, ref: nil, retry_after: nil) ⇒ CircuitOpenError
constructor
A new instance of CircuitOpenError.
Constructor Details
#initialize(message = nil, ref: nil, retry_after: nil) ⇒ CircuitOpenError
Returns a new instance of CircuitOpenError.
80 81 82 83 84 |
# File 'lib/insika/errors.rb', line 80 def initialize( = nil, ref: nil, retry_after: nil) @ref = ref @retry_after = retry_after super( || "circuit open for #{ref}") end |
Instance Attribute Details
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
78 79 80 |
# File 'lib/insika/errors.rb', line 78 def ref @ref end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
78 79 80 |
# File 'lib/insika/errors.rb', line 78 def retry_after @retry_after end |
Instance Method Details
#classification ⇒ Object
86 87 88 |
# File 'lib/insika/errors.rb', line 86 def classification { kind: :circuit_open, retryable: true, retry_after: retry_after }.compact end |