Vibe-Code Bible · Book 4 · An automation that handles failure
Original narrated teaching demonstration. Northlight Studio is fictional.
Northlight Studio receives an enquiry. Our fictional workflow should validate it, save one record, and prepare a response for human review. The practice simulator contacts no external service.
Start with an incomplete event. Check the event identifier, email, and project brief. If a required field is invalid, stop before creating a customer record.
Now send the same valid event twice. A stable event identifier lets the workflow recognise the retry and reuse the earlier result, instead of creating a duplicate.
What if storage is unavailable? Stop downstream actions, retain the event for a controlled retry, and show the failure. Do not claim the enquiry was saved.
Keep a small operator trail: event identifier, failed step, status, time, and retry count. Leave unnecessary private customer text out of broad logs.
Test valid, invalid, repeated, and unavailable-service scenarios. This proves the intended rules. Before launch, separately verify the actual services, permissions, and delivery behaviour.
Download transcript