Skip to content

Add proper error handling for user-facing async operations #95

@tmshv

Description

@tmshv

Problem

Several async operations catch errors but only log them — the user never sees feedback when something fails.

Affected code

  1. src/store/source/addFromUrl.ts:84-86 — file loading errors logged but not shown to user:

    } catch (error) {
        logger.error("Failed to add Source %s", error)
    }
  2. src/store/source/showProperties.ts:57waitEvent("properties-init") has no timeout and can hang forever if the properties window fails to initialize

  3. src/lib/source-reader.ts:18-48 — catches all errors and returns null, callers may not check for null

  4. src/main.tsx:14-17 — async init errors silently swallowed (separate issue Async initialization errors silently swallowed in main.tsx #77)

What needs to change

  1. Propagate errors to Redux state so the UI can show error notifications
  2. Add timeouts to waitEvent calls
  3. Use Mantine's notification system (or similar) to show user-facing error messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions