Free auditStart free
GuideError · CDN and hosting errors

Vercel 500: Internal Server Error

A Vercel 500 is usually FUNCTION_INVOCATION_FAILED or INTERNAL_UNEXPECTED_ERROR. Tell them apart, read the logs, and fix crashes and unhandled rejections.

3 min
read
4
sources
Nov 1, 2026
updated
Scaplet Editorial Team
author
In one line

A Vercel 500 usually shows FUNCTION_INVOCATION_FAILED, meaning a function invocation failed: the runtime crashed or Node.js or Bun threw an unhandled rejection or uncaught exception. Read the function's logs, wrap risky code in try/catch, and check environment variables. INTERNAL_UNEXPECTED_ERROR is the generic variant, and Vercel's documented step is to contact support with your deployment ID.

30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
500
Status
FUNCTION_INVOCATION_FAILED
Main code
INTERNAL_UNEXPECTED_ERROR
Generic code
Function logs
First stop
02How it works

Reproduce and read the evidence

Reader's own deployment: show status and the body that carries the code
curl -sS -i https://your-project.vercel.app/api/example | head -20
Public endpoint: a plain 500 for comparison (no Vercel code in the body)
curl -sS -o /dev/null -w "%{http_code}\n" https://httpbin.org/status/500
# expected output: 500
  1. 01

    Capture the body and status

    Run the curl below against the failing URL. A body that starts with a code name tells you which row of the table applies.

  2. 02

    Open the logs

    Vercel says application logs are under the Logs tab for the project, and also at the host URL under the /_logs path. Look for the stack trace at the time of the 500.

  3. 03

    Find the unhandled path

    Look for an await with no catch, a thrown error in a callback, or a crash at module load, for example reading an environment variable that is not set in that environment.

  4. 04

    Compare environments

    If preview works and production fails, check that each environment variable exists for the Production environment too.

03Your call

Make the function fail loudly instead of crashing

Vercel's guidance for FUNCTION_INVOCATION_FAILED is to confirm the code is correct and free of infinite loops, use a try/catch around work that might throw, and look for unhandled exceptions. A handler that catches, logs the cause and returns a deliberate response gives you a readable log line instead of a crashed invocation.
If this fits

Debug it yourself when

  • The body shows FUNCTION_INVOCATION_FAILED
  • Logs contain a stack trace or an unhandled rejection
  • It started after a deploy or an environment variable change
Or

Contact Vercel support when

  • The body shows INTERNAL_UNEXPECTED_ERROR
  • Logs show nothing from your code for the failing request
  • You can supply the deployment ID and a failing URL
api/example.js: catch, log with context, respond on purpose
export default async function handler(req, res) {
  try {
    const data = await loadData(req.query.id);
    res.status(200).json(data);
  } catch (err) {
    console.error('example handler failed', { id: req.query.id, message: err.message });
    res.status(500).json({ error: 'Could not load data' });
  }
}
04Explained

What a 500 does to search visibility

Google says 5xx and 429 server errors prompt its crawlers to temporarily slow down with crawling. Already indexed URLs that return them are preserved in the index but eventually dropped. A single failing API route matters little, but a 500 on a page template takes every URL built from it out of reach together. Use 5xx server errors to list the affected URLs, and compare with FUNCTION_INVOCATION_TIMEOUT, which is the slow-function sibling rather than the crashing one.

Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01What does FUNCTION_INVOCATION_FAILED mean on Vercel?

A function invocation failed. Vercel lists two causes: the runtime process crashed, or Node.js or Bun threw an unhandled rejection or uncaught exception. The fix starts in the function's logs.

02How do I fix INTERNAL_UNEXPECTED_ERROR?

You cannot fix it from code. Vercel describes it as an unexpected and unspecified internal error and says to contact support with your deployment ID.

03Where are Vercel function logs?

Under the Logs tab for the project in the dashboard, and Vercel's error pages also point to the /_logs path at the host URL.

Sources · 4

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • vercel.com
  • google.com
  1. 01Vercel docs: FUNCTION_INVOCATION_FAILEDvercel.com · checked 2026-11-01
  2. 02Vercel docs: INTERNAL_UNEXPECTED_ERRORvercel.com · checked 2026-11-01
  3. 03Vercel docs: FUNCTION_THROTTLED (logs location)vercel.com · checked 2026-11-01
  4. 04How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane