electric-sql / electric-sql/pglite

Expose useLiveQuery SQL error

Open
#594 1 comment 2 reactions 1 assignee Claimed by @tdrz View on GitHub
Dominant language
TypeScript
Stars
16k
Forks
442
Avg merge
20h 19m
Merged PRs (30d)
7

Description

I'm building a SQL editor using `pglite` and `react-pglite`. While a user is editing query there can be syntax errors in the query. The `useLiveQuery` hook in that case throws an error like:

```js
Uncaught (in promise) error: syntax error at or near "table"
```

sql-console-error

But there is no way to obtain this SQL error from `useLiveQuery`. If I have access to the error I can expose it in the UI so that user can correct their query.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.