Summary
The rule treats a single getErrorMessage(err) or err instanceof Error anywhere in a catch block as suppressing every unsafe access in that block (hasGuard is per-frame, order-independent — see CallExpression/BinaryExpression handlers in eslint-factory/src/rules/no-unsafe-catch-error-property.ts:72-92). A guard in one branch wrongly suppresses an unguarded access executed in a sibling/earlier branch.
Example missed today
try { f(); } catch (err) {
if (cond) { return getErrorMessage(err); }
core.setFailed(err.message); // unsafe, but suppressed by the guard above
}
Acceptance criteria
Generated by 🤖 ESLint Refiner · 156.2 AIC · ⌖ 11 AIC · ⊞ 4.7K · ◷
Summary
The rule treats a single
getErrorMessage(err)orerr instanceof Erroranywhere in a catch block as suppressing every unsafe access in that block (hasGuardis per-frame, order-independent — seeCallExpression/BinaryExpressionhandlers ineslint-factory/src/rules/no-unsafe-catch-error-property.ts:72-92). A guard in one branch wrongly suppresses an unguarded access executed in a sibling/earlier branch.Example missed today
Acceptance criteria