Vercel 500 FUNCTION_INVOCATION_FAILED? Your function crashed: where to look first

Ship ItChecked against the official source

The short answer

Vercel's error docs: FUNCTION_INVOCATION_FAILED (500) occurs when a function invocation fails. Possible causes: the runtime process (Node.js, Bun, Python, etc.) has crashed, or Node.js or Bun threw an unhandled rejection or uncaught exception.

What to do

  1. Open your project's Logs tab and find the error from the failed invocation.
  2. Review the function code, and use a try/catch block to catch errors that might be occurring within it.
  3. Verify the function configuration, including any environment variables or other settings.

Good to know

  • Our tip: if it works locally but not on Vercel, compare your environment variables first. Changed variables need a redeploy.

Source

Checked on 8 Nov 2026. Prices, limits and settings change, so check the source before you rely on them.

Related