PDFCraft
Error reference

internal_error

HTTP 500 · not billed

{ "error": {
    "code": "internal_error",
    "message": "…",
    "docs_url": "https://pdfcraft.dev/errors#internal_error"
} }

When you get it

Something on our side broke.

Something on our side broke: a bug, a dependency that stopped answering, or a resource that ran out. It is never a statement about your request — anything wrong with a request is rejected at the boundary as a 400, and a page that fails to render is a 422. A 500 means we did not get far enough to have an opinion about your input, so resending the identical body is a reasonable thing to do.

How to fix it

Is it billed?

No. A request is billed only when Chromium actually ran. Rare enough that a run of them is a signal worth reporting rather than routing around. The common exception is a burst immediately after a deploy on our side; if a retry a minute later succeeds, that was 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

HTTPCodeBilled?
400invalid_requestfree
401invalid_api_keyfree
402payment_requiredfree
404not_foundfree
408render_timeoutfree
422render_failedbilled
429rate_limitedfree
429quota_exceededfree
429demo_busyfree
415unsupported_filefree
422extraction_failedfree
500internal_errorfree