An error message is a clue, not a verdict. This prompt asks what the error means, where it comes from in your code and how to fix it and confirm the fix, so you learn something each time instead of pasting patches you do not understand.
Explain and fix this error
Explains an error in plain words, finds the likely cause and gives a fix with a way to check it; change the language, your level and the context.
Act as a patient senior Python developer helping me debug. My experience level: beginner. What I was doing when the error appeared: running a script that reads a CSV file and adds up one column. Error message: (paste the full error message here) Relevant code: (paste the code around the error here) Answer in this order: 1. What the error means, in plain words, in two or three sentences. 2. The most likely cause in my code, pointing to the exact line or function. 3. The fix: a corrected snippet with a short comment on what changed. 4. How to check that it is fixed. 5. Other possible causes, most likely first, in case the fix does not work. Match the depth of your explanation to my level. If you need more information, such as another file, the full stack trace or the library versions, tell me exactly what to share instead of guessing.
Click a highlighted part to change it.
Make it yours
Pick an option or type your own. The preview updates as you go: copy it when it reads right, or open it straight in your AI tool.
Your version stays in this browser. Ctrl or ⌘ + Enter copies it.
About this prompt
Why it works
- Your level
Saying how experienced you are sets the depth of the explanation, from first principles to a quick pointer.
- What you were doing
The action that triggered the error narrows down the causes far more than the message alone.
- A fixed answer order
Meaning, cause, fix and check, in that order, give you understanding and a way to verify, not just a patch.
- Ask, do not guess
Telling the model to request missing details stops confident fixes for problems you do not have.
Tips for better results
- Paste the full error and stack trace, not just the last line; the useful clue is often further up.
- Remove passwords, API keys, tokens and personal data from logs and code before you paste them.
- If the error names a line number, mark that line in your code with a comment so the model can find it.
- Once it is fixed, ask “What would have caught this earlier?” to get a test or a check for next time.
Variations to try
- Build failure
Act as a senior front-end engineer. My production build fails, but the development server runs fine. Below are the full build log and my build configuration. Explain the error in plain words, give the most likely cause and the exact change to make, then list two other causes to check if that does not work. Ask for any file you need instead of guessing.
- Explain it like I am new
I am learning JavaScript, and when my page loads I get a TypeError saying it cannot read properties of undefined while mapping over data from an API. Explain what this means with a simple everyday comparison, show the most common reason it happens when data loads asynchronously, and give a short fixed example that waits for the data before mapping over it.
Questions
What should I paste?
The full error message, the code around the line it points to and what you were doing when it happened. The more context, the more accurate the answer.
What if the fix does not work?
Paste the new error or result back into the same chat. The prompt asks for other likely causes, so work through those in order.
Did this prompt work for you?
Thanks. Your answer helps the next person.
Quick copy
Explain and fix this error
Copies your version from the studio.
For prompt makers
Got a prompt that works every time?
Send it in. We review every submission by hand and credit you on the page when it goes live.