Skip to content

Enhance Admin Query Error Messages for Missing Tables - #107

Closed
seer-by-sentry[bot] wants to merge 2 commits into
mainfrom
seer/feat/admin-query-table-suggestions
Closed

Enhance Admin Query Error Messages for Missing Tables#107
seer-by-sentry[bot] wants to merge 2 commits into
mainfrom
seer/feat/admin-query-table-suggestions

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Fixes API-12. The issue was that: Administrator submitted EXPLAIN queries for non-existent tables via the admin query tool, causing PostgreSQL to report missing relations.

  • Added logic to detect PostgreSQL '42P01' (undefined_table) errors in admin queries.
  • Implemented functionality to extract the missing table name from the error message.
  • Introduced a mechanism to fetch available table names from the database.
  • Developed a Levenshtein distance algorithm to find and suggest similar table names.
  • Included the top 5 table name suggestions in the AdminQuerySyntaxError response for missing table errors.
  • Updated the AdminQuerySyntaxError schema to include an optional suggestions array.

This fix was generated by Seer in Sentry, triggered by Owen. 👁️ Run ID: 9816938

Not quite right? Click here to continue debugging with Seer.

@barecheck

barecheck Bot commented Feb 6, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 92.8%

Your code coverage diff: 0.05% ▴

Uncovered files and lines
FileLines
src/routes/admin/query.ts120, 123, 132

@owens1127

Copy link
Copy Markdown
Contributor

@copilot fix the issue in ci

Copilot AI commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@owens1127 I've opened a new pull request, #110, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Update OpenAPI spec with suggestions field

Co-authored-by: owens1127 <98496129+owens1127@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: owens1127 <98496129+owens1127@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants