Code RoomPayment webhook silent failure
MediumPrep Room Coding #4415

Payment webhook silent failure

Vibe & agenticAlgorithms & data structuresMid–Senior~15 min

An AI wrote this Flask webhook handler for incoming payment events. The endpoint always returns 200, the team sees no errors in logs, yet some paid orders never get fulfilled. Find the bug and explain why it's invisible.

Implement
webhook_response_status(outcomes: list[str]) → list[int]
Examples
in[["ok","db_error","fulfill_error"]]out[200,500,500]
in[["bad_payload","duplicate"]]out[400,200]
in[[]]out[]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 15 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.