Status Codes

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.

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 ("NO_FILES_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": "NO_FILES_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

Type: DEPLOYMENT_NOT_READY_REDIRECTING

Deployment not ready, redirecting to inspector.

Type: DEPLOYMENT_BLOCKED

Your subscription was blocked.

Type: NO_FILES_FOUND

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

Type: DEPLOYMENT_NOT_FOUND

The deployment you tried to access does not exist.

Type: LAMBDA_PAYLOAD_TOO_LARGE

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

Type: INTERNAL_LAMBDA_NOT_FOUND

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

Type: INTERNAL_INVALID_LAMBDA_REGION

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

Type: INTERNAL_LAMBDA_INVOCATION_FAILED

The Routing layer was not able to invoke the Lambda.

Type: NO_STATUS_CODE_FROM_LAMBDA

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

Type: LAMBDA_INVOCATION_TIMEOUT

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