Search forkrail

Search documentation, comparisons, and CLI commands.

Error codes

What each error forkrail answers with means, and how to fix it. Error responses carry the code in the x-forkrail-error header.

Codes

The names match Vercel’s where Vercel has the same error, so existing monitoring keeps working. Each error page also shows the request id, which you can look up with forkrail logs PROJECT --request ID.

StatusCodeWhat happened, and what to do
404DEPLOYMENT_NOT_FOUNDNo deployment answers on this host. Check the domain is added to a project and its DNS points at your install.
404NOT_FOUNDThe deployment has nothing at this path. Add the file or route, or a 404.html.
401DEPLOYMENT_PROTECTEDDeployment protection is on and the client has no access. Sign in, or send a bypass secret.
403FORBIDDENA firewall rule denied the request (x-forkrail-mitigated: deny). Check the Firewall page’s Blocked tab.
403CHALLENGE_FAILEDThe firewall’s challenge wasn’t passed. Use a browser, or exempt the client with a bypass rule.
429RATE_LIMITEDA firewall rate limit was reached. Wait for retry-after, or raise the limit.
429TOO_MANY_REQUESTSOne address sent more than the system mitigations allow. Add a system bypass for trusted traffic.
413FUNCTION_PAYLOAD_TOO_LARGEThe request body is over 4.5 MB. Upload large files straight to S3 with a signed URL.
494REQUEST_HEADER_TOO_LARGEOne header field is over 32 KB. Send less in cookies or headers.
431Over 500 header fields, or about 127.5 KB of headers in all. Send fewer or smaller headers.
500FUNCTION_INVOCATION_FAILEDYour function threw or crashed. Look at the request’s app output in Logs.
504FUNCTION_INVOCATION_TIMEOUTThe function ran past its max duration. Raise max duration, or move long work to a background job.
500MIDDLEWARE_INVOCATION_FAILEDMiddleware threw. Look at the request’s output in Logs.
504MIDDLEWARE_INVOCATION_TIMEOUTMiddleware didn’t start answering within its time (25 seconds by default). Do less in middleware, or set its max duration.
508INFINITE_LOOP_DETECTEDA request called the same project more than 5 levels deep, or over 1,000 times. Check rewrites and fetches that call your own site.
503DEPLOYMENT_PAUSEDThe project reached its spend limit. Raise the budget, then forkrail spend resume.
504ROUTER_EXTERNAL_TARGET_ERRORAn external rewrite didn’t answer within 120 seconds. Check the other site.
400INVALID_IMAGE_OPTIMIZE_REQUESTAn image request’s url, w or q isn’t allowed by images. Add the width to sizes, or the host to remotePatterns.
416RANGE_NOT_SATISFIABLEA Range lies outside the file. Request a range within the file.
421MISDIRECTED_REQUESTThe request names two different hosts, or a port the router doesn’t answer on. Check the client’s URL and Host header.
502ROUTER_STATIC_UNAVAILABLEA static file couldn’t be read from S3. Retry; if it persists, check the install’s bucket in AWS.
New to forkrail? Install it in your AWS account and deploy your first app in about 20 minutes.
Quickstart