Exception: ScreenshotFreeAPI::JobTimeoutError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/screenshotfreeapi/errors.rb

Overview

Raised when a job does not complete within the configured polling timeout.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job_id, timeout_seconds) ⇒ JobTimeoutError

Returns a new instance of JobTimeoutError.



83
84
85
86
87
# File 'lib/screenshotfreeapi/errors.rb', line 83

def initialize(job_id, timeout_seconds)
  super("Job #{job_id} did not complete within #{timeout_seconds}s")
  @job_id          = job_id
  @timeout_seconds = timeout_seconds
end

Instance Attribute Details

#job_idObject (readonly)

Returns the value of attribute job_id.



81
82
83
# File 'lib/screenshotfreeapi/errors.rb', line 81

def job_id
  @job_id
end

#timeout_secondsObject (readonly)

Returns the value of attribute timeout_seconds.



81
82
83
# File 'lib/screenshotfreeapi/errors.rb', line 81

def timeout_seconds
  @timeout_seconds
end