Skip to content

fix(ui): audit the silent catch blocks in lib/features; some hide failures from the user #1762

Closed

Description

@ZhuchkaTriplesix

Problem

A rough classification of the 434 `catch` blocks in `lib` found about 46 empty ones and 10 that only return a fallback value. In `lib/features` the worst offenders are Mongo (15) and the workspace (15), then Redis, SQLite, connections and ERD. Most are harmless best-effort code (cache, history, probe). A few change what the user sees:

  • `lib/features/mongodb/mongo_databases_view.dart:117`: a failed `listDatabases` (for example no permission) becomes an empty list with no message.
  • `lib/features/connections/sqlite_connection_form.dart:141`: `catch (_) {}` around choosing a file.
  • Query and CLI history (`mongo_query_workspace.dart:206`, `redis_cli_workspace.dart:290`): lost silently, no log.

The classification is automatic and approximate; each site needs a look.

Proposal

Go through the silent catches in `lib/features` and `lib/shared` and give each a category: harmless (`logIgnored`) or user-relevant (report, see the helper issue). Start with the Mongo database list.

Part of the error-handling epic.

Activity

  1. added
    bugSomething isn't working
    error-handlingTheme parser epic label: error-handling
    uiUser interface components and widgets
    P3Low priority / Polish & Enhancements
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1800 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority / Polish & EnhancementsbugSomething isn't workingerror-handlingTheme parser epic label: error-handlinguiUser interface components and widgets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions