Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ux(sql-workspace): query errors are a raw duplicated exception dump that exposes the internal LIMIT wrapper

Closed
#1,557 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
dart, flutter, mongodb, mysql, postgresql, sqlite
Domain
database, desktop

Research direction

Start with GenericSqlWorkspace.execute in lib/features/workspace/generic_sql_workspace.dart, the ResultsTab error display, and core/database/database_error_mapper.dart; inspect the separate error display in mongo_query_workspace.dart too. Trace how query wrappers affect driver error text and positions, then define and test mappings for SQLite, PostgreSQL, and MySQL. Done means the example shows a concise summary, wrapper text is hidden, details can be copied, and positions point into the user's SQL.

Written by the indexing model from the issue text.

Description

enhancement error-handling P2 ui ux
Problem

A failed query shows the driver exception dumped as-is, twice, including the internal statement the app wrapped around the user's SQL. Example (Demo Playground, SELECT o.id, u.name, ... FROM orders o JOIN users u ... where users has no name):

SqliteFfiException(sqlite_error: 1, , SqliteException(1): while preparing statement, no such column: u.name, SQL logic error (code 1)
  Causing statement (at position 29): SELECT * FROM (
SELECT o.id, u.name, ... ORDER BY o.id LIMIT 200
)
LIMIT 5000}) DatabaseException(SqliteException(1): while preparing statement, no such column: u.name, SQL logic error (code 1)
  Causing statement (at position 29): SELECT * FROM (
SELECT o.id, ...
)

What is wrong with it:

  • The same message appears twice (SqliteFfiException(...) wrapping DatabaseException(...)), with class names and sqlite_error: 1, , noise.
  • It leaks the app's own wrapper (SELECT * FROM ( ... ) LIMIT 5000, #1144 unique-column wrap) and the position 29 refers to the wrapper, not to the user's text, so it cannot be used to find the error.
  • There is no way to jump to the problem, no "Copy error", and the whole text has the same weight (a muted 13 px paragraph).
Where

GenericSqlWorkspace.execute: session.error = e.toString(); (lib/features/workspace/generic_sql_workspace.dart, the generic catch), rendered by ResultsTab (results_mode_error). core/database/database_error_mapper.dart already maps driver errors for connection failures but query errors do not go through it.

Proposal
  1. Map a query error to {summary, detail, position?, code?} per driver (SQLite, PostgreSQL, MySQL; others keep the text) and show the summary as the headline: no such column: u.name.
  2. Keep the original text behind "Show details" (collapsed), with a Copy button; strip the app wrapper from it.
  3. When the driver gives a position, translate it back to the user's text (subtract the wrapper prefix) and put the caret / a squiggle in the editor.
  4. Same panel for MongoDB's Query Error (it has its own copy in mongo_query_workspace.dart).
Acceptance
  • The example above reads no such column: u.name with details collapsed.
  • No SELECT * FROM ( wrapper text in a user-visible error.
  • Copy error copies the full original text.
  • Unit tests for the mappers of the three SQL drivers (positions mapped to the user's SQL).

Related: #1144.

Dominant language
Dart
Stars
23
Forks
1
Avg merge
49m
Merged PRs (30d)
496

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QueryaHub/Querya-Desktop

All issues in QueryaHub/Querya-Desktop

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.