navigation_failed
HTTP 422 · code: "navigation_failed" · type: https://docs.formfeed.dev/errors/navigation-failed
A url render could not load the page it names. The render is recorded as failed and costs nothing. detail carries the reason, often the browser's own message.
Example
{
"type": "https://docs.formfeed.dev/errors/navigation-failed",
"title": "Navigation failed",
"status": 422,
"detail": "URL returned HTTP 404",
"code": "navigation_failed",
"location": null,
"render_id": "rnd_7da09ab6cd9946b798c187c2a9350852",
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}
Common causes
- The page answered with an HTTP error, 400 or above (
URL returned HTTP 404). - The page did not finish loading within 30 seconds. By default Formfeed waits until the network is idle; a page that keeps polling, streams, or holds a connection open never gets there, and the problem says
Timeout 30000ms exceeded. - An
http:address. The API accepts it, but the browser loadshttpsonly (scheme http: is not allowed). - The host name does not resolve, or resolves to a private or internal address (
URL blocked: dns failure: …,URL blocked: resolves to private address …). Addresses that are private on their face are refused earlier, withinvalid_request. - The TLS certificate is invalid or expired, or the server refused the connection (
net::ERR_CERT_…,net::ERR_CONNECTION_REFUSED). - A redirect to an address Formfeed does not fetch.
- The page needs a login or blocks automated browsers, and answers with an error page or status. A
urlrender sends no cookies or headers of yours.
How to fix it
- Open the URL in a private browser window from outside your network.
- For pages that keep a connection open, set
waitFor.networkIdletofalse: the page is printed right after itsloadevent. AddwaitFor.selectorif its content arrives later. - Render pages that need a login from HTML instead: fetch the content yourself and send it as
html.
Retry?
Only when the page itself had a passing problem (a 5xx answer, a timeout of a slow server). Otherwise the same request gets the same answer. Send the retry with a new Idempotency-Key or without one: a 4xx answer is stored under its key for 24 hours, so the old key returns this problem again. See retrying. Async renders are not retried by the queue for this code.