render_failed
HTTP 422 · billed
{ "error": {
"code": "render_failed",
"message": "…",
"docs_url": "https://pdfcraft.dev/errors#render_failed"
} }When you get it
Chromium ran but the page threw, navigation failed, or waitFor.selector never appeared.
Chromium ran, and the page then threw, failed to navigate, or never produced the selector waitFor was told to wait for.
How to fix it
- Load the same HTML in a browser — whatever breaks there is what broke here.
- For url input, check the page is reachable without the cookies and headers your own browser is sending.
- A selector that never appears is the same error as a page that threw; the message says which.
Is it billed?
Yes. A request is billed only when Chromium actually ran. This one IS billed, and the distinction is deliberate: the browser did the work. Every other 4xx never reached 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 |