Exception: Insika::ProviderError
- Defined in:
- lib/insika/errors.rb
Overview
ACTION classification (B9). The fields ride in the task's error record and
the :task_failed event so the client envelope can tell fatal from
retryable and quote the provider's own retry_after (A8). A bare
ProviderError.new("boom") has an empty classification and adds nothing
to the contract.
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#retryable ⇒ Object
readonly
Returns the value of attribute retryable.
Instance Method Summary collapse
-
#classification ⇒ Object
the additive envelope fields, compacted — nil retry_after stays absent.
-
#initialize(message = nil, kind: nil, retryable: nil, retry_after: nil) ⇒ ProviderError
constructor
A new instance of ProviderError.
Constructor Details
#initialize(message = nil, kind: nil, retryable: nil, retry_after: nil) ⇒ ProviderError
Returns a new instance of ProviderError.
42 43 44 45 46 47 |
# File 'lib/insika/errors.rb', line 42 def initialize( = nil, kind: nil, retryable: nil, retry_after: nil) @kind = kind @retryable = retryable @retry_after = retry_after super() end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
40 41 42 |
# File 'lib/insika/errors.rb', line 40 def kind @kind end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
40 41 42 |
# File 'lib/insika/errors.rb', line 40 def retry_after @retry_after end |
#retryable ⇒ Object (readonly)
Returns the value of attribute retryable.
40 41 42 |
# File 'lib/insika/errors.rb', line 40 def retryable @retryable end |
Instance Method Details
#classification ⇒ Object
the additive envelope fields, compacted — nil retry_after stays absent.
50 51 52 |
# File 'lib/insika/errors.rb', line 50 def classification { kind: kind, retryable: retryable, retry_after: retry_after }.compact end |