Skip to content

30+ empty catch blocks silently swallow errors across the frontend #100

@EVWorth

Description

@EVWorth

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

  1. Add console.error() to every catch block
  2. Where appropriate, surface errors to the user via toast/notification
  3. Consider creating a shared error-handling utility to ensure consistency
  4. For critical paths (like schema fetching), add retry logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions