Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Improve formatting of SQLite errors in Hrana #417

Merged
merged 1 commit into from
May 22, 2023

Conversation

honzasp
Copy link
Contributor

@honzasp honzasp commented May 22, 2023

SQLite input error (statement SELECT foo) is now reported as:

{
  "message": "SQL input error: no such column: foo (at offset 7)",
  "code": "SQL_INPUT_ERROR"
}

and other SQLite errors (such as constrait violation) is now reported as:

{
  "message": "SQLite error: UNIQUE constraint failed: t.a",
  "code": "SQLITE_CONSTRAINT"
}

Fixes #390.

@honzasp honzasp requested a review from CodingDoug May 22, 2023 09:26
@honzasp honzasp added this pull request to the merge queue May 22, 2023
Merged via the queue into libsql:main with commit 74d57e0 May 22, 2023
@honzasp honzasp deleted the better-sqlite-error branch July 10, 2023 07:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQLite errors sent to client apps formatted with Some(...), could be less cryptic
2 participants