4xx or 5xx status and a problem details body, sent as application/problem+json. Its code is a stable name for the error, such as FILE_TOO_LARGE: branch on it, never on title or detail, which can change. Error codes lists every code with what to do about it, and each operation in the API reference lists the codes it can answer.
Some codes add members of their own, such as
max_size_mb above; the code’s page lists them.
A run is a call that starts a job, such as POST /parse or client.parse.run. A job that fails after it starts reports the same problem in the error field of its status, and its result route answers with it.
What each status means
Retry without starting a job twice
A failedrun may have started its job. The SDKs never retry on their own (max_retries and maxRetries have no effect), so retry in your own code by these rules:
- Reads start nothing. Send a status or result read again after a network error, or when
retryableistrue. - Fix a request whose
retryableisfalsebefore you resend it. Sent again unchanged, it fails the same way. - If the error names a job, read that job’s status. The problem holds the job’s id, such as
parse_id, when Pulse recorded the job before the request failed. If the job isqueued,processingorcompleted, poll it instead of starting another. If it’sfailedorcanceled, start a new one. - If the error names no job, go by its
code. AfterCAPACITY_EXCEEDED,RATE_LIMIT_EXCEEDEDorFILE_DOWNLOAD_TIMEOUT, no job is running, so you can send therunagain. After any other5xx, or a timeout or dropped connection on your side, a job may still be running, so don’t. - Send long work with
async: true, which returns the job’s id at once, and log every job id so a retry can check what already ran.
Python
client is the one from SDKs. A timeout or connection error isn’t an ApiError, so the helper lets it through without a retry. In TypeScript, the same loop catches PulseError, which has statusCode, body and rawResponse.headers; look for each member under both spellings, such as parse_id and parseId.
Warnings
A completed result can carrywarnings about problems that didn’t stop the job but may affect its result, such as PAGES_FAILED when some pages of a long document couldn’t be parsed. Each has a stable code and a message: log them, and match on code.
Jobs and results
Statuses, polling and result retention.
SDKs
The clients, their errors and their timeouts.