Skip to content

[P0/bug] Failed queries record String(e) error; structured error lost; UI doesn't show error at all #324

Closed

Description

@EVWorth

Context

resultStore.doExecuteQuery (src/stores/resultStore.ts:209-218) records failed queries with error: String(e) where e is the raw Tauri Error from the wire. The QueryHistory panel renders the XCircle icon + the SQL but does NOT show the error message anywhere — a user has to scroll the editor or rerun to see why a query failed.

Problem

The error message is recorded in the entry data but invisible in the UI. The String(e) flattens any structured error fields (code, kind, etc.) that the Rust CoreError may have attached. A user debugging a recurring "Table 'x.y' doesn't exist" sees the red X but can't tell which table without re-running.

Files

  • src/stores/resultStore.ts:209-218
  • src/components/history/QueryHistory.tsx:87-95

Expected

A failed query entry shows an inline error message (truncated with tooltip showing full text). The error preserves structured fields where possible (code, kind, message).

Proposed fix

Scope M — (a) change api.executeQuery to return a structured Result<T, StructuredError> shape, or wrap the thrown error in resultStore to extract {code, message, sql} from the Tauri error string. (b) In QueryHistory.tsx, render the error message inline below the SQL for failed entries (red text, truncated with tooltip).

Acceptance

A query that fails with "Table 'x.y' doesn't exist" shows in the history panel with the red error text inline; clicking the entry shows the full error message.

Needs human verify

yes

Activity

  1. added
    audit
    severity/p0
    kind/bug
    area/history
    on Jul 31, 2026
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

    area/historyauditkind/bugseverity/p0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions