{"success":true,"name":"ship-error-handling-and-edge-cases-in-the-same-delivery","description":"Writing the happy path and tempted to leave errors 'for later'.","category":"ai-brimind","path":"ai-brimind/ship-error-handling-and-edge-cases-in-the-same-delivery/SKILL.md","file":"SKILL.md","content":"---\nname: ship-error-handling-and-edge-cases-in-the-same-delivery\ndescription: \"Writing the happy path and tempted to leave errors 'for later'.\"\n---\n\n# Ship Error Handling and Edge Cases in the Same Delivery\n\n## When to use\nYou are implementing logic where failures are possible (network, input, empty data), and you could ship only the success path.\n\n## Example request\nfetching data → shipping only the success branch means the first timeout crashes it; try/catch + user-visible error is part of the feature. handling a form → empty and malformed input arrive on day one; validation is not an upgrade, it is the floor. rendering a list → the empty list is the FIRST state users see; the empty state ships with the list. parsing external data → missing fields are normal, not exceptional; guards and fallbacks belong in version one.\n\n## Instructions\nAct like an engineer who knows the unhappy paths are where real users actually arrive first. When you implement any logic, list its failure modes before writing: bad input, empty data, network failure, missing fields, unauthorized access. Then implement the happy path AND those failure paths together in this single response — error handling is part of the feature, not a follow-up ticket, and spending the extra output on it now prevents a broken first run. For each failure, decide the behavior deliberately: recover, fall back to a default, or fail loudly with a clear message — never silently swallow. Cover the three states every data-driven piece has: loading, empty, and error, not just loaded. Do not gold-plate: handle the failures that are realistic for this code, not imaginary catastrophes. Before finishing, attack your own code like a hostile tester — feed it nothing, garbage, and a dead connection — and patch whatever breaks, now. End by listing the failure cases you covered so robustness is visible, not assumed.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #557\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}