render_timeout
HTTP 408 · not billed
{ "error": {
"code": "render_timeout",
"message": "…",
"docs_url": "https://pdfcraft.dev/errors#render_timeout"
} }When you get it
The page did not finish within timeoutMs and was force-closed.
The page did not finish inside timeoutMs and the context was force-closed. This is a hard ceiling, not a suggestion: a hung page must never hold a concurrency slot open.
How to fix it
- Raise timeoutMs — up to 120000.
- Relax waitFor. networkIdle never settles on a page with a long-poll, an analytics beacon or a websocket, and that is the single commonest cause.
- Prefer waitFor.selector over networkIdle: it waits for the thing you actually care about.
Is it billed?
No. A request is billed only when Chromium actually ran. Not billed, because nothing usable came out of it.
Reproducing it
curl -i -X POST https://api.pdfcraft.dev/v1/render \
-H "Authorization: Bearer $PDFCRAFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<h1>hi</h1>"}'The -i matters: Retry-After and X-Renders-Remaining are headers, and a client that only reads the body throws away the two numbers that tell it what to do next.
Every code
| HTTP | Code | Billed? |
|---|---|---|
| 400 | invalid_request | free |
| 401 | invalid_api_key | free |
| 402 | payment_required | free |
| 404 | not_found | free |
| 408 | render_timeout | free |
| 422 | render_failed | billed |
| 429 | rate_limited | free |
| 429 | quota_exceeded | free |
| 429 | demo_busy | free |
| 415 | unsupported_file | free |
| 422 | extraction_failed | free |
| 500 | internal_error | free |