Skip to content
Log in

Error Handling Review

Finds every path that swallows an error, leaves state half-written, or reports success after failing.

0

Share this prompt

Free — no card needed

Create a free account

to open Error Handling Review — and the other 364 prompts across 21 categories.

We store your email address to send these. We never sell it or pass it to advertisers. Withdraw at any time. Privacy Policy.

Already have an account?

CategoryCodingForDevelopersTested onClaudeChatGPTGemini

Running it, start to finish

  1. Paste the code with what state it writes and what calls it.
  2. Fix the partial-write findings first.
  3. Add a test for each error path you repaired.

What you get back

The output this produces, every time.

  • Traces every multi-write operation to say what state a mid-way failure leaves.
  • Finds functions that return success after something inside them failed.
  • Checks resource cleanup on the throwing path, not just the normal one.

Getting better results

Where this usually goes wrong, and how to avoid it.

  • Describe what the code writes. Section 2 is the highest-value part and it needs to know what state is touched, in what order.
  • Check batch operations carefully. Partial batch failure reported as success is common, damaging and almost never handled on the first pass.
  • Turn each finding into a test. Error paths are the least-tested code in most projects, which is exactly why they contain these bugs.

More Coding prompts

All Coding

Written for The AI University. Every prompt in this library is original work — authored, tested and revised here, not collected from elsewhere. 365 of them, free with an account.