The instinct is to paste an error somewhere and wait for a fix. Reading it yourself first takes thirty seconds and often makes the fix obvious — and it gets faster every time.

The anatomy

The type. TypeError, SyntaxError, ConnectionRefused, 404. This alone narrows the problem enormously. A syntax error is never a logic problem; a connection error is never a code problem.

The message. Usually says specifically what went wrong. Cannot read properties of undefined (reading 'name') tells you exactly which property and that the thing before it was undefined.

The location. File and line. Note that this is where it surfaced, which isn't always where it originated — but it's where to start.

The stack. How you got here. Read from the bottom up, and find the first frame that's your code rather than a library's.

Read the first error, not the last

A page of errors is usually one error and a cascade of consequences. Fix the first; the rest often vanish.

This applies to build logs especially, where the last line is typically "build failed" and the actual cause is four hundred lines above it.

Errors that don't mean what they say

Some are famously misleading:

  • A syntax error on a line that looks fine. The problem is usually on the line before — an unclosed bracket or a missing comma.
  • "Module not found" for something that exists. Case sensitivity, or the wrong directory, or it's in the wrong dependency section.
  • A CORS error in the browser that's actually a server error — the failed request never sent CORS headers, so the browser reports the symptom it can see.
  • A timeout that's really a firewall or an SSL requirement.

When you do ask

Give the whole thing:

error-help.txt
Full error and stack trace: <paste all of it>
The code at the line it points to: <paste, with context>
What I was doing when it happened: <describe>
What I've already tried: <list>

Tell me: what this error type means generally, what triggered it here
specifically, the fix, and what I could have noticed myself.

That last question is what makes the next one faster.

Search the exact error message text, minus your own file paths and variable names. Someone has had it before, almost certainly.