Skip to content

fix: don't crash the UI on unreadable simple queries - #13007

Open
Pandry wants to merge 1 commit into
logseq:masterfrom
Pandry:fix/query-dsl-double-colon
Open

fix: don't crash the UI on unreadable simple queries#13007
Pandry wants to merge 1 commit into
logseq:masterfrom
Pandry:fix/query-dsl-double-colon

Conversation

@Pandry

@Pandry Pandry commented Aug 9, 2026

Copy link
Copy Markdown

A query containing a token the edn reader rejects (like an auto-resolved keyword typo like (between [[2020-01-01]] ::today)), threw from query-dsl/parse.

The query builder component renders inline for #Query blocks and calls parse-query outside any error handling, so the reader exception took down the whole React tree and left the graph unusable.

Read the query string with common-util/safe-read-string, like every other query-string read site, so unreadable input yields an empty query (the invalid-query result callers already handle) while unexpected errors keep bubbling to the block-level error boundaries.

Addresses #12926

The writing of this code was assisted by LLM (especially the test, as I don't know Clojure as much), so please double-check it. I made sure to read it and I think I understand it.

A query containing a token the edn reader rejects, e.g. an
auto-resolved keyword typo like (between [[2020-01-01]] ::today),
threw from query-dsl/parse. The query builder component renders
inline for #Query blocks and calls parse-query outside any error
handling, so the reader exception took down the whole React tree and
left the graph unusable.

Read the query string with common-util/safe-read-string, like every
other query-string read site, so unreadable input yields an empty
query (the invalid-query result callers already handle) while
unexpected errors keep bubbling to the block-level error boundaries.
@CLAassistant

CLAassistant commented Aug 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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