In order to give you the best possible insight into what exactly is wrong with your deployment, we implemented several status codes into the Routing Layer of Now.

Response Types

By default, browsers (and any other client that sets the Accept header to a value containing text/html) will receive the status codes as the following HTML template:

An example of how a status code response could look like

Depending on your status code, the title ("404"), description ("The page could not be found") and the code ("FILE_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": "FILE_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: FILE_NOT_FOUND

There is no Static File or Lambda in your Build Output that matches this path.

404

Type: DEPLOYMENT_NOT_FOUND

The deployment you tried to access does not exist.

413

Type: LAMBDA_PAYLOAD_TOO_LARGE

The request's body is too large for invoking the Lambda.

500

Type: INTERNAL_LAMBDA_NOT_FOUND

We were not able to locate the Lambda responsible for the path you tried to access.

500

Type: INTERNAL_INVALID_LAMBDA_REGION

No Lambda was found in the region identifier attached to the deployment.

500

Type: INTERNAL_INVALID_LAMBDA_ACCOUNTS

No valid AWS Accounts were found for the Lambda. This is a problem with Now itself. Please reach out to us for support with a deployment URL so we may help resolve this error.

500

Type: INTERNAL_LAMBDA_INVOCATION_FAILED

The Routing layer was not able to invoke the Lambda.

502

Type: NO_STATUS_CODE_FROM_LAMBDA

The Lambda responsible for the path you tried to access did not reply with a status code.

502

Type: BODY_NOT_A_STRING_FROM_LAMBDA

The Lambda responsible for the path you tried to access replied with a non-string body.

504

Type: LAMBDA_INVOCATION_TIMEOUT

The Lambda responsible for the path you tried to access did not reply in time.