Exception: DilisensePepClient::NetworkError
- Defined in:
- lib/dilisense_pep_client/errors.rb
Overview
Raised when there’s a network problem (timeout, connection failure, etc.) These errors are usually retryable after a delay
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Error
#context, #error_code, #request_id, #timestamp
Instance Method Summary collapse
-
#initialize(message, network_error: nil, **options) ⇒ NetworkError
constructor
A new instance of NetworkError.
- #retryable? ⇒ Boolean
Methods inherited from Error
Constructor Details
#initialize(message, network_error: nil, **options) ⇒ NetworkError
Returns a new instance of NetworkError.
194 195 196 197 198 199 200 201 |
# File 'lib/dilisense_pep_client/errors.rb', line 194 def initialize(, network_error: nil, **) context = { network_error_class: network_error&.class&.name, network_error_message: network_error&. }.merge(.fetch(:context, {})) super(, error_code: "NETWORK_ERROR", context: context, **) end |
Instance Method Details
#retryable? ⇒ Boolean
203 204 205 |
# File 'lib/dilisense_pep_client/errors.rb', line 203 def retryable? true end |