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.

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

CODENAMEDESCRIPTION
530Internal Layer0 ErrorUnexpected error in Layer0. Please contact support immediately.
531Project Upstream Connection TimeoutYour project timed out while waiting to establish an upstream connection.
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 Unexpected ErrorYour project's serverless code has failed unexpectedly. 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, and the upstream took too long to respond.
537DNS 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 TimeoutYour project's serverless code did not respond on time, either due to slow upstreams or to badly handled asynchronous requests in code (e.g. missing await or call to callback). Use server logs and performance profiling to debug.
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.
544ReservedNot used by Layer0 at this time.
545Layer0 Component Not ReadyAn unprepared Layer0 component received traffic. 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.

Layer0 also issues these standard response codes:

CODENAMEDESCRIPTION
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.
Edit this guide on GitHub