Your Mission
Create or find 4 errors (one of each type), read the messages, and identify type, message, location, and variable involved. Output: error_reading_log.md.
You need: Any AI coding tool with console/dev tools.
Time: 25 minutes.
Step 1: Learn the 4 Error Types (5 min)
1. Syntax Errors — code is malformed (missing bracket, typo):
SyntaxError: Unexpected token '}'
Look for: "Syntax" or "Parse," line number, unexpected token.
2. Runtime Errors — code runs but fails (undefined, not defined):
TypeError: Cannot read properties of undefined (reading 'map')
ReferenceError: supabase is not defined
Look for: type (TypeError, ReferenceError), specific message, variable name. Very common in AI code.
3. Logic Errors — no error message, but wrong result: The tip calculator shows $10/person instead of $30. No crash — just wrong math. Hardest to catch.
4. Deployment Errors — works locally, fails deployed:
Error: Environment variable not found: API_KEY
Build failed: Module not found
Look for: "Build," "Environment," HTTP status codes (404, 500).
When reading any error, focus on:
- Error type (TypeError, SyntaxError) — the category
- Specific message — what went wrong
- File and line number — where it happened
- Variable/function name — what was involved
Ignore: The stack trace (long list of function calls). The AI can read it.
The error message is your prediction input
Knowing the four types helps you make better predictions. 'TypeError: Cannot read properties of undefined (reading map)' → runtime error, code tried to .map() over something undefined, probably a data loading timing issue. Better prediction → faster debugging → better debugging instinct.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers Step 2: Build or Open a Project (2 min), Step 3: Create/Find 4 Errors (15 min), Error 1: Syntax, Error 2: Runtime, Error 3: Logic, Error 4: Deployment, You're Done — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.