Summary
Over 30 .catch(() => {}) blocks across the frontend silently discard errors with zero logging, making debugging impossible and hiding real failures from users.
Affected Files
| File |
Count |
Impact |
src/stores/aiStore.ts |
3 |
AI status, permission, cancel errors ignored |
src/stores/themeStore.ts |
2 |
localStorage read/write failures ignored |
src/stores/settingsStore.ts |
4 |
localStorage read/write failures ignored |
src/stores/editorStore.ts |
2 |
Session save/load failures ignored |
src/hooks/useSchemaCache.ts |
6 |
All schema fetch failures ignored — UI silently shows empty schemas |
src/components/grid/ResultsGrid.tsx |
1 |
Clipboard copy failure ignored |
src/components/grid/CellViewerModal.tsx |
3 |
Clipboard copy failures ignored |
src/components/layout/StatusBar.tsx |
1 |
Version fetch failure ignored |
src/components/designer/TableDesigner.tsx |
2 |
Table fetch error ignored |
src/components/editor/SQLEditor.tsx |
1 |
Editor action failure ignored |
src/components/editor/QueryToolbar.tsx |
1 |
Favorite save failure ignored |
src/components/layout/ConnectionTabs.tsx |
2 |
Connection tab errors ignored |
src/components/compare/SchemaCompare.tsx |
3 |
Schema diff failures ignored |
src/components/admin/UserManagement.tsx |
3 |
User management errors ignored |
Impact
- Schema data silently becomes empty with no indication to the user that something went wrong
- Failed clipboard operations provide no feedback
- localStorage corruption silently loses user settings with no recovery path
- Debugging production issues is extremely difficult
Fix
- Add
console.error() to every catch block
- Where appropriate, surface errors to the user via toast/notification
- Consider creating a shared error-handling utility to ensure consistency
- For critical paths (like schema fetching), add retry logic
Summary
Over 30
.catch(() => {})blocks across the frontend silently discard errors with zero logging, making debugging impossible and hiding real failures from users.Affected Files
src/stores/aiStore.tssrc/stores/themeStore.tssrc/stores/settingsStore.tssrc/stores/editorStore.tssrc/hooks/useSchemaCache.tssrc/components/grid/ResultsGrid.tsxsrc/components/grid/CellViewerModal.tsxsrc/components/layout/StatusBar.tsxsrc/components/designer/TableDesigner.tsxsrc/components/editor/SQLEditor.tsxsrc/components/editor/QueryToolbar.tsxsrc/components/layout/ConnectionTabs.tsxsrc/components/compare/SchemaCompare.tsxsrc/components/admin/UserManagement.tsxImpact
Fix
console.error()to every catch block