Exception: Api2Convert::ConversionTimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/api2convert/errors.rb

Overview

A job did not reach a terminal status within the configured poll timeout.

The job is still running server-side — re-fetch it later with client.jobs.get(job.id). (Maps to the PHP SDK's TimeoutException; named to avoid shadowing Ruby's Timeout::Error.)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(job, timeout_seconds) ⇒ ConversionTimeoutError

Returns a new instance of ConversionTimeoutError.



108
109
110
111
112
113
114
# File 'lib/api2convert/errors.rb', line 108

def initialize(job, timeout_seconds)
  @job = job
  super(
    "Timed out after #{timeout_seconds}s waiting for job #{job.id} to finish " \
    "(last status: #{job.status.code})."
  )
end

Instance Attribute Details

#jobModel::Job (readonly)

Returns the job that was still running when the wait timed out.

Returns:

  • (Model::Job)

    the job that was still running when the wait timed out.



106
107
108
# File 'lib/api2convert/errors.rb', line 106

def job
  @job
end