promptdojo_

Claude wrote a parser that pulls the assistant text out of a fake Anthropic response. The chain uses strict [] access at every level. If the response was filtered (no content array), the parser crashes with KeyError.

Replace the strict chain on line 2 with the safe pattern: default content to [], return the string "(blocked)" if the list is empty, otherwise pull the first block's text out with .get().

The starter has a content-filtered response (no content key). Expected output:

(blocked)
The break is on line 2 — but read the whole snippet first.

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.