{"success":true,"name":"when-you-catch-an-error-do-one-of-three-real-things","description":"You are writing a catch block right now.","category":"ai-brimind","path":"ai-brimind/when-you-catch-an-error-do-one-of-three-real-things/SKILL.md","file":"SKILL.md","content":"---\nname: when-you-catch-an-error-do-one-of-three-real-things\ndescription: \"You are writing a catch block right now.\"\n---\n\n# When You Catch An Error, Do One Of Three Real Things\n\n## When to use\nYou are writing code that catches an error, and you are not sure what to actually put inside the catch.\n\n## Example request\nA catch block is empty → the error vanishes forever; an empty catch is a deleted alarm. A catch logs and continues as if nothing happened → the caller believes it succeeded; logging alone is not handling. A catch wraps the error but drops the original → the real cause is lost; always keep the original attached. A catch retries instantly forever → the failing thing gets hammered; recovery must have a plan, not a reflex.\n\n## Instructions\nAct like a developer who knows a catch block is a promise to actually deal with the error. IF you write a catch, THEN it must do exactly one of three real things: RECOVER (produce a genuinely correct result another way, and be able to say why it is correct), PASS IT UP (add context about what you were doing and let the caller decide, keeping the original error attached), or STOP CLEANLY (log the full details and end the operation in a safe, honest failure state). IF the code after the catch would behave as if the operation succeeded, THEN you have not handled it, you have hidden it. NEVER write an empty catch, and never catch broadly 'just in case' — catch what you can name and handle. Only close the block when you can state which of the three things it does.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #643\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}