Summary
Several catch blocks silently swallow errors, returning defaults or doing nothing.
Affected area
(every try { … } catch { } or near-empty catch observed in repo)
src/utils/security/blockchainSecurity.ts — falls back to default score, hides errors
src/utils/security/phishingProtection.ts — silently returns unsafe=false
src/utils/walletHelpers.ts — returns null
src/hooks/useSearchHistory.ts — JSON.parse failures disappear
src/hooks/useCurrencyConverter.ts — silently fails rate fetch
src/components/ViewToggle.tsx — swallows localStorage errors
Steps to reproduce / impact
Silent catch blocks hide regressions, data corruption, and intermittent outages from observability tools. Users experience mysterious failures.
Expected behaviour
At minimum, log via logger.warn/logger.error and add structured context. Trigger user-visible toasts when the failure affects UX.
Acceptance criteria
Summary
Several catch blocks silently swallow errors, returning defaults or doing nothing.
Affected area
(every
try { … } catch { }or near-empty catch observed in repo)src/utils/security/blockchainSecurity.ts— falls back to default score, hides errorssrc/utils/security/phishingProtection.ts— silently returns unsafe=falsesrc/utils/walletHelpers.ts— returns nullsrc/hooks/useSearchHistory.ts— JSON.parse failures disappearsrc/hooks/useCurrencyConverter.ts— silently fails rate fetchsrc/components/ViewToggle.tsx— swallows localStorage errorsSteps to reproduce / impact
Silent catch blocks hide regressions, data corruption, and intermittent outages from observability tools. Users experience mysterious failures.
Expected behaviour
At minimum, log via
logger.warn/logger.errorand add structured context. Trigger user-visible toasts when the failure affects UX.Acceptance criteria