Try/catch everywhere, but errors vanish silently

A practical fix and a copyable AI coding prompt. Replace bracketed placeholders with your project details.

1. Check the problem

AI wraps everything in try/catch, then swallows the error in an empty block or a context-free log, the app looks robust and is blind. Every catch should recover, surface the error, or log it with context. Never empty.

2. Use the prompt

Find every try/catch in this change. For each, tell me whether it recovers from the error, surfaces it to the user, or just swallows it. Flag every silent catch (empty, a bare console.log, or a re-throw with no context) and rewrite it to either handle the error meaningfully or fail loudly with the inputs and stack trace. Don't add any new catch blocks.

3. Verify the fix

Review the proposed diff, run the relevant checks and exercise the original failing flow before merging.

Continue in the related workflow chapter or read the longer explanation.