CodeBeginner

Explain this error like a senior engineer would

Viktor Submitted by Viktor Added 3 days ago
Here's an error and the relevant code. Diagnose it properly.

1. Translate the error into plain language: what the runtime was trying to do when it gave up.
2. Name the actual cause, distinguishing it from where the error surfaced.
3. Show the minimal fix as a diff.
4. Explain why the fix works at the level of the underlying mechanism.
5. Give me the wrong fix people usually apply here and why it only hides the symptom.
6. Tell me what to add — a test, an assertion, a type — so this class of bug fails loudly next time.

If the code you can see is insufficient, say exactly which file or value you need before guessing.

ERROR:
{{paste full stack trace}}

CODE:
{{paste relevant code}}

ENVIRONMENT: {{language, versions, runtime}}

How to use it

Paste the whole stack trace, not the last line. Step 5 is what stops you from shipping the popular Stack Overflow band-aid.

Compatible popular AI tools

These tools are mapped to this prompt based on their capabilities.

People who liked this prompt

1 community likes