Promptles
Errors

Show Expected vs Actual

Always show both what the code produces now and what it should produce. 'The output is wrong' gives Claude no target. '$1,234.5 should be $1,234.50' makes the fix obvious.

Where you'll practice this

3 Promptles scenarios teach this principle directly. Each one drops you into a real engineering ticket and asks you to write the prompt you'd send to Claude Code.

  • Wrong Output

    You have a currency formatting utility in `utils/format.ts`. When you call `formatCurrency(1234.5)`, it returns `"$1,234.5"`. But the expected output is `"$1,234.50"` with a trailing zero. The function works fine for whole numbers and values with two decimal places, but drops…

  • The Webhook Debugger

    Your Stripe webhook endpoint is receiving events, the Stripe dashboard shows successful deliveries with 200 responses, but your PostgreSQL `payments` table has no new rows. You checked the server logs and see the endpoint is being hit, but no INSERT queries appear. The webhook…

  • The 401 Mystery

    Your Postman request to `GET https://api.partner.example.com/v1/orders` keeps returning `401 Unauthorized`, even though you're certain the token is right — you copied it straight out of the partner's developer dashboard 10 minutes ago. The team lead looked over your shoulder,…

Other principles in Errors