#52 most commondeployv0CursorWindsurfBolt.newReplit

500 INTERNAL_SERVER_ERROR / FUNCTION_INVOCATION_FAILED

500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED / This Serverless Function has crashed.

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

A server-side part of your app crashed. The page only shows a generic error; the real reason is in your host's function logs.

How to fix it: paste this prompt into your AI builder

Fix prompt for Bolt, Cursor, Replit, v0, Windsurf
My deployed API route returns 500 / FUNCTION_INVOCATION_FAILED. Wrap the route in try/catch that logs the real error and returns a helpful JSON error, then check the most likely causes: missing server env vars in production, a package that only works locally, database connection strings, or unhandled undefined values. Fix the root cause only and don't touch unrelated routes.

If the AI can't fix it: manual steps

  1. Open your host's function/runtime logs and copy the stack trace; paste that here for a more specific match.

Where this happens

Seen in these AI app builders and editors:

v0CursorWindsurfBolt.newReplit

Sources

Related deploy errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →