Works locally, 500s in production
Server log: `Error: OPENAI_API_KEY is undefined` — yet it works on your machine.
Every builder ships bugs, breaks a deploy, and leaks a key at least once. Here you meet those messes on purpose — read the symptom, diagnose the real cause, and choose the fix. Stuck? The hints escalate one nudge at a time, and solving with fewer of them earns more.
Server log: `Error: OPENAI_API_KEY is undefined` — yet it works on your machine.
The deploy log ends with "Build completed" but the browser console shows 404s for every `/assets/*.js` file.
A secret scanner flags `const key = "sk-live-..."` committed to your public repo.
`SyntaxError: Unexpected token` — the model wrapped its JSON in ```json fences.
`fetch failed: 503 Service Unavailable` bubbles up and crashes the UI.
`429 Too Many Requests` from the model provider.
Every environment returns `401 Unauthorized` from the provider at once, right after you rotated the compromised key.