Lesson 894 of 2116
When Things Break — Reading Errors With AI Help
Your first red error screen feels like the end of the world. It isn't. Here's the calm, repeatable way to get unstuck with AI help.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1Red Is Not Catastrophe
- 2error messages
- 3stack traces
- 4debugging
Concept cluster
Terms to connect while reading
Section 1
Red Is Not Catastrophe
The first time Bolt or Lovable shows you a red error screen you will panic. That is normal. Errors are the app's way of telling you exactly what confused it. AI is incredibly good at reading these messages — if you paste the right parts.
- 1The full error message — every line, including the scary call stack
- 2The file name and line number it points at
- 3What you did right before the error appeared
- 4Whether it worked 10 minutes ago or never worked
A great debugging prompt: exact error, exact location, what changed, and a request for the smallest fix.
My app crashed with this error:
TypeError: Cannot read properties of null (reading 'id')
at Dashboard (app/dashboard/page.tsx:23:18)
at Object.renderWithHooks (...)
This happened right after I added the filter tabs in the last prompt. Before that, the page loaded fine.
What's going on, and what's the smallest change that fixes it?Compare the options
| Error | Usually means |
|---|---|
| Cannot read properties of undefined | Data wasn't there when the page tried to use it |
| Module not found | Missing install — ask AI to install the package |
| Hydration mismatch | Server and browser rendered different HTML |
| Unauthorized / 401 | API key missing or wrong env variable name |
- Open a brand-new chat — context can get polluted
- Try a different model — Opus, Sonnet, GPT-5, Gemini
- Delete the offending feature and rebuild it from a cleaner prompt
- Ask a human friend who codes — sometimes a fresh brain sees it in 30 seconds
Key terms in this lesson
The big idea: errors are letters from your app, not insults to you. Read them, paste them, ask for the smallest fix, and you will get unstuck ninety percent of the time.
End-of-lesson quiz
Check what stuck
15 questions · Score saves to your progress.
Tutor
Curious about “When Things Break — Reading Errors With AI Help”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Creators · 14 min
Debug With Error Receipts
Do not tell the AI 'it broke.' Bring receipts: URL, action, expected result, actual result, console error, network error, and the exact time it happened.
Creators · 14 min
Make Terminal Output Your Shared Truth
Do not argue with the agent about what happened. Paste the exact command and output so both of you reason from the same evidence.
Creators · 11 min
AI coding: debugging from a stack trace without guessing
Paste the trace, the failing input, and the relevant function. Ask for a hypothesis tree — not a fix — until one branch is confirmed.
