promptdojo_

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

This function is meant to look up a key in a dict and return a default if the key isn't there. AI wrote except ValueError, which never matches, so the missing-key case still crashes. Fix the exception class on line 3 so the script prints unknown.

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

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