Skip to content
Last updated on June 7, 2023
4 min read

Application Error Codes

This section focuses on errors that can happen at the level of your application when you interact with Vercel.

The requested Serverless Function from the application did not return a string as the body.

This is an error with the application.


502: Bad Gateway
Code: BODY_NOT_A_STRING_FROM_FUNCTION
  • Check the application logs, which can be found at the host URL under the /_logs path, for example:
    logs-url
    https://my-deployment-my-username.vercel.app/_logs
  • Check if the application is returning an empty response, or possibly null.

The deployment was blocked by the platform infrastructure layer due to a problem with the application.


Code: DEPLOYMENT_BLOCKED
  • If you have recently downgraded to the Hobby plan, you will need to redeploy your projects to make them available once again.
  • Contact Support to see why your deployment was blocked and how to resolve it.

The request for a Edge Function was not completed successfully. This is an application error.


500: Internal Server Error
Code: EDGE_FUNCTION_INVOCATION_FAILED
  • A common cause for this issue is when the application contains an unhandled exception. Check the application logs, which can be found at the host URL under the /_logs path, for example:
    logs-url
    https://my-deployment-my-username.vercel.app/_logs

The maximum duration for an Edge Function execution is 30 seconds, otherwise the request will time out. This is an application error.


504: Gateway Timeout
Code: EDGE_FUNCTION_INVOCATION_TIMEOUT
  • A common cause for this issue is when the application contains an unhandled exception. Check the application logs, which can be found at the host URL under the /_logs path, for example:
    logs-url
    https://my-deployment-my-username.vercel.app/_logs

When making a request to get the content of a page, the response buffer size exceeded the maximum value of 10 MB.


502: Prerender fallback file is too big for cache
Code: FALLBACK_BODY_TOO_LARGE
  • Inspect the code for the page in question to see how you can reduce the amount and size of content being returned as HTML or JSON
Note: This can happen when the content is not available in the edge cache and it needs to be fetched from the static file at origin. In that case, the prerender of a static file content has a limit of 10 MB.
  • If the link is correct and you were not expecting this error, Contact Support.

The request for a Serverless Function was not completed successfully. This is an application error.


500: Internal Server Error
Code: FUNCTION_INVOCATION_FAILED
  • A common cause for this issue is when the application contains an unhandled exception. Check the application logs, which can be found at the host URL under the /_logs path, for example:
    logs-url
    https://my-deployment-my-username.vercel.app/_logs

The request for a Serverless Function reached the timeout threshold. This is an application error.


504: Gateway Timeout
Code: FUNCTION_INVOCATION_TIMEOUT
  • A common cause for this issue is when the application contains an unhandled exception. Check the application logs, which can be found at the host URL under the /_logs path, for example:
    logs-url
    https://my-deployment-my-username.vercel.app/_logs

An error occurred in the application when requesting a Serverless Function with a payload exceeding 6MB.


413: Request Entity Too Large
Code: FUNCTION_PAYLOAD_TOO_LARGE
  • Reduce the size of the request payload.

An infinite loop was detected within the application.


508: Loop Detected
Code: INFINITE_LOOP_DETECTED
  • Check the application's source code for a redirect loop.
  • Check the application's configuration redirects for a redirect loop.

An error occurred because requests were being made too quickly and were subsequently rate limited by our upstream provider.


429: Too Many Requests
Code: FUNCTION_RATE_LIMIT
  • Please review the Support Article found here.
  • If the advice found within the article does not solve this issue, Contact Support.

An error occurred in the application when requesting a static resource with a request type other than GET or HEAD.


405: Method Not Allowed
Code: INVALID_REQUEST_METHOD
  • Check your client application logic or cURL command for a request type other than a GET or HEAD.

The application did not respond correctly, this is likely due to an exception being thrown from the function handler. Other reasons for this could be the following:

  • A global uncaught exception.
  • A global unhandled rejection.
  • A deployment that introduced incorrect syntax.

502: Bad Gateway
Code: NO_RESPONSE_FROM_FUNCTION
  • Open the realtime request logs for the application in a separate tab - this tab must be kept open while reproducing the error.
  • Repeat the application behavior that led to the error being thrown and review the realtime request logs where it will now show.
  • Use the information contained within the error present in the logs to understand where the function is failing.
  • If you're yet to implement a Log Drain, you can create one to persist errors from Serverless Functions.

The requested file or Serverless Function was not found in the application.


404: Not found
Code: RESOURCE_NOT_FOUND
  • Make sure the link you accessed is correct.
  • Check the output of your deployment.
  • If you believe the link is correct and you were not expecting this error; Contact Support along with the ID on the error page from your deployment.

An error occurred in the application when matching too many rewrites.


502: Bad Gateway
Code: TOO_MANY_FILESYSTEM_CHECKS
  • Reduce the number of rewrites that match the erroring request path.
  • Contact Support if you have trouble locating the rewrites causing the error.

An error occurred in the application when matching too many conditional routes. You cannot have more than 5 has routes matched on a single path.


502: Bad Gateway
Code: TOO_MANY_FORKS
  • Reduce the number of rewrites, redirects, or headers with a has key (conditional route) that match the erroring request path.
  • Contact Support if you have trouble locating the conditional routes causing the error.

This error occurs for Serverless functions only, when a request header contains non-UTF-8 characters. Typically, the cookie header contains such invalid characters (raw binary values for example).


400: Bad Request
Code: MALFORMED_REQUEST_HEADER
  • Make sure your request headers (especially cookie values) are valid UTF-8 string.