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:
CODE | NAME | DESCRIPTION |
---|---|---|
530 | Internal Layer0 Error | Unexpected error in Layer0. Please contact support immediately. |
531 | Project Upstream Connection Timeout | Your 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.) |
532 | Project Response Too Large | Your project returned a response size greater than the allowed 6MB. |
533 | Project Upstream TLS Error | The 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. |
534 | Project Error | Your project’s serverless code has failed unexpectedly or has issued a malformed response. Use server logs to debug. |
535 | Unknown Project | The HTTP header host is missing or does not match any Layer0 deployment. Check your requesting URL and your project config. |
536 | Project No HTTP Response | Layer0 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. |
537 | Project DNS Resolution Error | Failed to resolve the host name through DNS, which might indicate a problem with your DNS provider or incorrectly configured domain name. |
538 | Project Request Loop | The 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. |
539 | Project Timeout | The 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. |
540 | Out of Memory | Your project’s serverless code caused an out-of-memory situation. Use server logs to debug and lower the memory use. |
541 | Layer0 Out of Workers | The traffic was so high that the request could not be scheduled for processing within the scheduling timeout. Please contact support to upgrade your account. |
542 | Project Header Overflow | The Layer0 project’s request or response had too many HTTP headers. See limits |
543 | Global Upstream Timeout | The request failed to propagate between Layer0 edge and the global POP. Please contact support. |
544 | Invalid Host Header | The Layer0 received a value in host header that is not a valid domain name. |
545 | Layer0 Component Not Ready | An unprepared Layer0 component received traffic. Please contact support immediately. |
546 | Layer0 Global POP TLS Error | The was an error negotiating a secure TLS connection with the Layer0 global POP. Please contact support immediately. |
547 | Layer0 Global POP No HTTP Response | Layer0 did not receive an HTTP response from the global POP. Please contact support immediately. |
548 | Layer0 Global POP DNS Resolution Error | Layer0 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:
CODE | NAME | DESCRIPTION |
---|---|---|
400 | Bad Request | The URL is too long or the request headers are too large. See limits |
404 | Not Found | The 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. |
412 | Precondition Failed | This code is returned when the query string parameter layer0_prefetch equals 1 and the content was not found in the edge cache. |