Status Codes

HTTP status codes are how the web signals errors and other states from the server to the web browser. If there is an error from your backend website, the error is simply forwarded by Layer0 to the browser.

Layer0 exclusive status codes

If the error is generated in Layer0 itself, the platform generates a 53x or 54x HTTP status code:

530Internal Layer0 ErrorUnexpected error in Layer0. Please contact support immediately.
531Project Upstream Connection TimeoutYour project failed to establish an upstream connection. This is different from 536 where your project timed out waiting for a response from the upstream. Common causes are the upstream host you specified in your project is incorrect, the DNS entry you defined points to the wrong server, your servers are not responding, or you need to add the Layer0 IP addresses to your allowlist. (Contact your operations team and ask them to add the IP addresses in Allowlisting in Network Configuration to your server’s IP allowlist.)
532Project Response Too LargeYour project returned a response size greater than the allowed 6MB.
533Project Upstream TLS ErrorThe was an error negotiating a secure TLS connection with the upstream. Common causes are the host name provided does not match the name in the upstream TLS certificate, or the upstream TLS certificate has expired.
534Project ErrorYour project’s serverless code has failed unexpectedly or has issued a malformed response. Use server logs to debug.
535Unknown ProjectThe HTTP header host is missing or does not match any Layer0 deployment. Check your requesting URL and your project config.
536Project No HTTP ResponseLayer0 did not receive an HTTP response from the upstream. Common causes are the upstream dropped the connection prematurely, the upstream application threw an exception, and the upstream took too long to respond.
537Project DNS Resolution ErrorFailed to resolve the host name through DNS, which might indicate a problem with your DNS provider or incorrectly configured domain name.
538Project Request LoopThe Layer0 project exceeded the maximum level (4) of nested Layer0 requests. “Nested” means an Layer0 site is the upstream of itself or of another Layer0 site.
539Project TimeoutThe 539 status code is primarily caused by timeouts, but can also be caused by lack of allow lists (white lists) configured on your backend server. Timeouts: Your project’s serverless code did not respond on time, either due to slow or blocking upstream or to badly handled asynchronous requests in code (e.g. missing await or call to callback). Troubleshooting: You can view the timings and status codes of the components in the stack in the x-0-t header Use server logs and performance profiling to debug. You can also debug using information in Troubleshooting 539 Status Codes, which includes information about detecting allow list errors.
540Out of MemoryYour project’s serverless code caused an out-of-memory situation. Use server logs to debug and lower the memory use.
541Layer0 Out of WorkersThe traffic was so high that the request could not be scheduled for processing within the scheduling timeout. Please contact support to upgrade your account.
542Project Header OverflowThe Layer0 project’s request or response had too many HTTP headers. See limits
543Global Upstream TimeoutThe request failed to propagate between Layer0 edge and the global POP. Please contact support.
544Invalid Host HeaderThe Layer0 received a value in host header that is not a valid domain name.
545Layer0 Component Not ReadyAn unprepared Layer0 component received traffic. Please contact support immediately.
546Layer0 Global POP TLS ErrorThe was an error negotiating a secure TLS connection with the Layer0 global POP. Please contact support immediately.
547Layer0 Global POP No HTTP ResponseLayer0 did not receive an HTTP response from the global POP. Please contact support immediately.
548Layer0 Global POP DNS Resolution ErrorLayer0 failed to resolve the global POP’s host name through DNS. Please contact support immediately.

Obviously, your project can set status codes of their own, which may sometimes match codes above. We encourage you to avoid setting your own status code so as to lower troubleshooting overhead and other issues.

Standard status codes used by Layer0 itself

Layer0 also issues these standard response codes:

400Bad RequestThe URL is too long or the request headers are too large. See limits
404Not FoundThe server cannot find the requested resource. This usually occurs when the browser requests a page that your app does not have. A 404 will also occur when a request does not match any of the routes in your Layer0 router. See routing for more information.
412Precondition FailedThis code is returned when the query string parameter layer0_prefetch equals 1 and the content was not found in the edge cache.