waitFor is a method on the client returned by createClient. Its return type depends on the target:
Parameters
Returns
Afailed job is returned, not thrown. Inspect its error. See long-running jobs for upload finalization and alternative polling methods.
Throws
PotatoApiErrorwithcode: "wait_timeout"andbody: { timeoutMs }when the timeout expires.PotatoApiErrorwithcode: "http"when a polling request fails.- A local error for invalid polling options, or when
datasetSplitcannot find the named split field. - Other errors from
fetchor the credential callback are passed through.