Skip to content

refactor(errors): one helper that logs an error and tells the user in plain words #1761

Closed

Description

@ZhuchkaTriplesix

Problem

User-visible error handling is inconsistent:

  • `mapDatabaseError` / `describeDatabaseError` (plain message + remediation hint) are used by 9 files in `core`, and by none in `lib/features`.
  • About 46 strings in `lib/features` put the raw exception into the message (`'...$e'`): Redis 18, Mongo 18, workspace 5, connections 5, recovery 4, extensions 4, others.
  • The same situation shows a toast on one path, a `TreeLoadError` on another and nothing on a third. Example: editing a connection showed an error, creating one did not (fixed for creation in fix(connections): report and log a failed save of a new connection #1757).

Proposal

  • One helper, for example `reportError(context, error, {where, action})`: logs (see the log-file issue), maps through `mapDatabaseError`, shows an error toast with `displayText`.
  • `saveNewConnection` (fix(connections): report and log a failed save of a new connection #1757) becomes a user of it.
  • Replace the raw `$e` messages in `lib/features`, starting with Redis and Mongo.
  • Decide once which surface is used when: toast for an action, `TreeLoadError` for lazy loads, `QueryErrorView` for queries.

Part of the error-handling epic.

Activity

  1. added
    enhancementNew feature or request
    error-handlingTheme parser epic label: error-handling
    uiUser interface components and widgets
    P2Medium priority / Parity & Refactoring
    on Oct 25, 2026
  2. added 5 commits that reference this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1794, #1795, #1798, #1799 (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

    P2Medium priority / Parity & RefactoringenhancementNew feature or requesterror-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