Skip to content

fix(editor): check request bodies as JSON and bind :name in SQL only - #3255

Merged
datlechin merged 2 commits into
mainfrom
fix/elasticsearch-console-diagnostics
Oct 4, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/elasticsearch-console-diagnostics

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

In the Elasticsearch console every valid Query DSL body showed a red syntax error on its first key, and GET /products/_search?q=name:lamp opened the Parameters panel for lamp and would not run. The editor checked the request as a MongoDB script because Elasticsearch highlights as JavaScript, and it read :name as a bind parameter on every engine except MongoDB.

Change

  • Elasticsearch, Typesense and Weaviate requests get a JSON body check instead of the JavaScript parser. The request line is skipped, so GET /_cat/indices/* is no longer an unterminated comment.
  • Redis and etcd commands are not bracket-checked: SET smile :) is a valid command.
  • :name parameters are detected on SQL connections only. Colons in Elasticsearch URLs, Redis keys and SurrealDB record IDs are sent as written.

Verified

Tests cover each engine's diagnostics and the parameter gate, using the two requests from the report. MongoDB keeps its JavaScript check and SQL keeps its parameter panel.

Not in this PR

  • Format Query on an Elasticsearch or Typesense tab still uses the MongoDB formatter, picked the same way. Not checked here.
  • No screenshots: the capture path needs the owner's Touch ID this run.

Elasticsearch, Typesense and Weaviate highlight as JavaScript, so their requests went through the MongoDB JavaScript parser and every Query DSL body was flagged. Parameter detection ran on every engine but MongoDB, so a colon in a URL, a Redis key or a SurrealDB record ID opened the Parameters panel.
@mintlify

mintlify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
TablePro 🟢 Ready View Preview Oct 4, 2026, 10:58 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
@datlechin
datlechin merged commit 953b52b into main Oct 4, 2026
1 check passed
@datlechin
datlechin deleted the fix/elasticsearch-console-diagnostics branch October 4, 2026 12:38
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.

1 participant