Vercel · HTTP 500

Vercel 500: EDGE_FUNCTION_INVOCATION_FAILED

Investigate Vercel EDGE_FUNCTION_INVOCATION_FAILED by checking Edge runtime exceptions, unsupported Node APIs, bundle imports, and deployment logs.

Origin / Application

Decode a CDN or gateway error

Paste a captured HTTP response or enter a status and headers. Only the status and response headers are sent; common credential headers are filtered first.

Supports raw headers, full HTTP responses, JSON with status/statusCode and headers, cURL -v/-i response output, and HAR exports. HAR selects a server error first. cURL commands are never executed; request headers, response bodies, and common credential headers are excluded.

Diagnostic report

Error code / name

VERCEL-EDGE_FUNCTION_INVOCATION_FAILED

Fault domain

Origin / Application

Why it happened

The Edge Function failed during invocation, often because code throws or imports an API unavailable in the Edge runtime. A deployment-specific bundle or environment value can also trigger a runtime exception.

Actionable fixes

  1. Use the x-vercel-id to open the matching Edge Function invocation logs.
  2. Replace Node-only modules and APIs with Edge-compatible Web APIs, or move the handler to a Node.js function.
  3. Reproduce with production environment variables and validate every imported dependency in the deployed bundle.

Why this error happened

The Edge Function failed during invocation, often because code throws or imports an API unavailable in the Edge runtime. A deployment-specific bundle or environment value can also trigger a runtime exception.

Actionable fixes

  1. Use the x-vercel-id to open the matching Edge Function invocation logs.
  2. Replace Node-only modules and APIs with Edge-compatible Web APIs, or move the handler to a Node.js function.
  3. Reproduce with production environment variables and validate every imported dependency in the deployed bundle.

Network failure point

Client -> Vercel Edge -> Edge Function loads -> runtime exception -> X response

Verify origin directly via CLI

curl -sS -v --max-time 30 https://example.com/edge/health -o /dev/null

Configuration fix

app/api/edge-health/route.tstypescript
export const runtime = "edge";

export async function GET() {
  return Response.json({ status: "ok" });
}

Catch this failure before it becomes an outage

SteadyNode's regional HTTP checks detect deployed edge failures quickly and record provider headers so teams can match outages to a specific invocation.

No credit card required.

Start for free

Frequently asked questions

Why does an Edge Function fail only after deployment?

The deployed runtime can have different environment variables, bundle contents, and API restrictions from a local Node.js process.

Should I move every failing function to the Edge runtime?

No. Use Edge runtime only when its API and duration constraints match the handler; a Node.js function may be the correct runtime.

Cloudflare

Vercel and Netlify

AWS CloudFront and ALB

Fastly

Heroku and Render

Nginx and Envoy