Debug a Production Error

Walks through a stack trace systematically: what failed, why, and the smallest change to fix it without introducing risk.

coding debugproductiontriage

The prompt

I'm seeing this error in production:

{{error_or_stack_trace}}

Walk me through:

1. What is actually failing — the immediate cause, not just the symptom.
2. Why it's happening — the root cause, with the specific code path or condition that triggers it.
3. The smallest change that fixes it without introducing other risks. Show the actual code change, not just a description.
4. What I should add to make this kind of error easier to debug next time (logging, assertions, types).
5. Whether this is a one-time fix or a class of bugs likely to surface elsewhere.

If you need information you don't have (relevant source code, the input that triggered it, framework version), say what you need before guessing.

Recommended models

44 upvotes · 0 views · Coding