In order to give you the best possible insight into what exactly is wrong with your deployment, we implemented several status codes into the Network Layer of ZEIT Now.
Response Types
By default, browsers (and any other client that sets the Accept
header to a value containing text/html
) will receive status codes as a HTML template.
Depending on your status code, the title ("404"), description ("The page could not be found") and the code ("RESOURCE_NOT_FOUND") will vary.
However, if your client is sending the Accept
header with a value that contains application/json
, it will receive the same error, but formatted as JSON:
{ "status": "RESOURCE_NOT_FOUND", "description": "The page could not be found" }
Assuming that your client is not sending the Accept
header at all, we will default to sending the description of the status code in the text/plain
format (plain text):
The page could not be found
List of Status Codes
303
Type: DEPLOYMENT_NOT_READY_REDIRECTING
Deployment not ready, redirecting to inspector.
402
Type: DEPLOYMENT_BLOCKED
Your subscription was blocked.
404
Type: RESOURCE_NOT_FOUND
There is no Static File or Serverless Function in your Build Output that matches this path.
404
Type: DEPLOYMENT_NOT_FOUND
The deployment you tried to access does not exist.
405
Type: INVALID_REQUEST_METHOD
The static file responsible for the path you tried can only accept GET
or HEAD
requests.
413
Type: FUNCTION_PAYLOAD_TOO_LARGE
The request's body is too large for invoking the Serverless Function.
500
Type: INTERNAL_FUNCTION_NOT_FOUND
We were not able to locate the Serverless Function responsible for the path you tried to access.
500
Type: INTERNAL_INVALID_FUNCTION_REGION
No Serverless Function was found in the region identifier attached to the deployment.
500
Type: INTERNAL_INVALID_FUNCTION_ACCOUNTS
No valid AWS Accounts were found for the Serverless Function. This is a problem with ZEIT Now itself. Please reach out to us for support with a deployment URL so we may help resolve this error.
500
Type: INTERNAL_FUNCTION_INVOCATION_FAILED
The Network layer was not able to invoke the Serverless Function.
502
Type: NO_STATUS_CODE_FROM_FUNCTION
The Serverless Function responsible for the path you tried to access did not reply with a status code.
502
Type: BODY_NOT_A_STRING_FROM_FUNCTION
The Serverless Function responsible for the path you tried to access replied with a non-string body.
504
Type: FUNCTION_INVOCATION_TIMEOUT
The Serverless Function responsible for the path you tried to access did not reply in time.
508
Type: INFINITE_LOOP_DETECTED
The Serverless Function responsible for the path you tried to access started an infinite loop.