Back to Errors

500 — your server code crashed

What is this error?

The request arrived, your own code ran, and it threw an exception. The browser can only tell you it broke — the reason is in the server logs.

Common Causes

  • A value was undefined and something was read off it.
  • A database query failed.
  • A missing environment variable at runtime.
  • A third-party call failed and nothing handled the failure.

How to fix it (Check First)

  • 1Open the hosting/function logs. The real stack trace is there, not in the browser.
  • 2Find the first line of the trace that names your own file.
  • 3Reproduce with the smallest possible input.

What NOT to do

  • Do not guess in the frontend. The frontend is not where this broke.

Technical Details

5xx indicates a server-side fault. The response body is often generic by design so internals aren't leaked to callers; correlate by request ID in your logs.