Fix · Vercel and deploying
500 error from a serverless function
Blocks your workNot checked against the vendor's current screens
What you may see
- The page or action shows 500 Internal Server Error on the live site only
- The browser shows FUNCTION_INVOCATION_FAILED
Most likely cause
The server code throws an error that the page hides from visitors; the real message is in the function logs.
Check first (about two minutes)
- Open the project's function (runtime) logs at the time of the error: is there a red line with a message?
- Check if the same page works locally with production variables names present.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Ask me for the error message and stack lines from the function logs (remove secrets).
- Find the exact line that throws and what it needs (a missing variable, a database call that fails, data that is null).
- Fix the cause and make the code handle the failure with a clear message instead of crashing.
- Redeploy and test the failing route.
Do not do this
- Do not guess without reading the log.
- Do not show raw error details to visitors.