Exception: DilisensePepClient::TimeoutError

Inherits:
NetworkError show all
Defined in:
lib/dilisense_pep_client/errors.rb

Overview

Timeout-related errors

Instance Attribute Summary collapse

Attributes inherited from Error

#context, #error_code, #request_id, #timestamp

Instance Method Summary collapse

Methods inherited from Error

#security_event?, #to_h

Constructor Details

#initialize(message, timeout_duration: nil, **options) ⇒ TimeoutError

Returns a new instance of TimeoutError.



293
294
295
296
297
298
299
300
301
302
# File 'lib/dilisense_pep_client/errors.rb', line 293

def initialize(message, timeout_duration: nil, **options)
  @timeout_duration = timeout_duration
  
  context = {
    timeout_duration: timeout_duration,
    timeout_type: determine_timeout_type(message)
  }.merge(options.fetch(:context, {}))
  
  super(message, error_code: "TIMEOUT_ERROR", context: context, **options)
end

Instance Attribute Details

#timeout_durationObject (readonly)

Returns the value of attribute timeout_duration.



291
292
293
# File 'lib/dilisense_pep_client/errors.rb', line 291

def timeout_duration
  @timeout_duration
end

Instance Method Details

#retryable?Boolean

Returns:

  • (Boolean)


304
305
306
# File 'lib/dilisense_pep_client/errors.rb', line 304

def retryable?
  true
end