You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Silent catches: a bare catch{} swallows the error with no reason on record #205
Shipped sources contain catch clauses whose block is completely empty — no statement, no comment, no named error. The failure is swallowed and nothing on record says why that is safe. Today:
Nothing distinguishes "the error cannot matter here" from "nobody looked". The oxlint config (no-undef, no-unused-vars) gates nothing about this, so nothing stops the next silent catch from landing.
Expected behavior
A catch that swallows an error says why — at minimum a comment in the block naming the reason (racing unlink, best-effort refresh, retry on next poll), and a named binding whenever the handler could act on the error. A repo check fails the build on a bare catch, the way plugin-imports fails the build on an out-of-package import.
Where it sits
The list above; the natural gate home is .github/scripts/ + its .test.mjs, which the package job of tests-ok and root npm run verify already run — no workflow change needed.
Suggested direction (for discussion, not prescriptive)
Add .github/scripts/check-empty-catch.mjs: scan core/src/**, core/index.js, core/web-search.js, plugins/*/src/**, plugins/*/index.js, plugins/*/client.js; flag a catch clause (statement form — the .catch(() => {}) promise form is a separate, deliberate void idiom and stays out of scope) whose block holds neither a statement nor a comment. Test helpers under test/ stay out of scope.
Annotate each bare catch above with the truthful reason.
Record the rule in docs/code-standards.md.
Not user-visible: no changelog fragment.
Reliability angle: the README promises a Bot's results can be checked; a swallowed error is exactly where that breaks silently.
Activity