promptdojo_

try/except — catching what AI didn't — step 6 of 9

Claude shipped this and it "worked" for weeks before someone noticed the function was hiding a typo. The bare except: swallows everything, including the real bug. Replace the bare except: with one that catches only ValueError. The output should be fallback.

The break is on line 4 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.