Errors / checked October 9, 2026

500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED

The error

The response from a Vercel Function, often a cron route, when the function crashed or threw an error it did not catch. Vercel lists it as 500 FUNCTION_INVOCATION_FAILED: Internal Server Error.

Quick fix

  1. Open the function's Runtime Logs in the Vercel dashboard for that request: the stack trace of the exception is there.
  2. Look for an unhandled rejection: an await without try/catch, or a promise nobody awaited, crashes the Node.js or Bun process.
  3. For a cron route, wrap the job body in try/catch, log the error and return a 500 yourself, so the failure is recorded instead of crashing the runtime.

Why this happens

Vercel returns this when the function invocation fails: the runtime process (Node.js, Bun, Python) crashed, or Node.js or Bun threw an unhandled rejection or uncaught exception.

Source: Vercel: FUNCTION_INVOCATION_FAILED

Other solutions

  • Missing environment variables are a common cause in cron routes that work locally: a client that throws on a missing key crashes the route.
  • Vercel does not retry a failed cron invocation, so one crash means a skipped run. A scheduler that calls the route and retries on a 5xx turns a transient crash into a short delay; RunLater retries with backoff and logs each response, including the error body.

Check a schedule before you deploy it: the cron expression explainer shows the next 10 run times.

Frequently asked questions

What causes FUNCTION_INVOCATION_FAILED?

Per Vercel: the runtime process crashed, or Node.js or Bun threw an unhandled rejection or uncaught exception. The Runtime Logs for the request show which.

How is it different from FUNCTION_INVOCATION_TIMEOUT?

TIMEOUT means the function ran past its maximum duration (a 504). FAILED means it crashed or threw (a 500) before finishing.

Does Vercel retry a cron job that fails this way?

No. Vercel does not retry a failed cron invocation; the next run happens at the next scheduled time.

Have the URL called on schedule, with retries

RunLater calls your URL on a cron schedule or at an exact time, in your timezone, retries failed calls with backoff and logs each response, so a timeout or a 5xx shows up in a log instead of disappearing.

Start a 14-day trialStarter is $15/month for 250 scheduled requests and 25,000 runs. Cancel before day 14 and you pay nothing.

Related errors