-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
sqlite: improve error messages for tag store #61096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MatricalDefunkt
wants to merge
2
commits into
nodejs:main
Choose a base branch
from
MatricalDefunkt:better-sqlite-errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+23
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When using SQLite tag store functions (sql.get`, sql.run`, etc.), preparation errors now show descriptive SQLite error messages instead of the generic 'Failed to prepare statement' message. The tag store's GetOrCreateStatement function now passes the database object to THROW_ERR_SQLITE_ERROR, allowing it to retrieve the actual error message from sqlite3_errmsg(), matching the behavior of the regular db.prepare() method. Fixes: nodejs#61051
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61096 +/- ##
==========================================
- Coverage 88.53% 88.52% -0.01%
==========================================
Files 703 703
Lines 208546 208546
Branches 40217 40225 +8
==========================================
- Hits 184634 184617 -17
- Misses 15926 15962 +36
+ Partials 7986 7967 -19
🚀 New features to boost your workflow:
|
himself65
approved these changes
Dec 18, 2025
cjihrig
approved these changes
Dec 18, 2025
Collaborator
Collaborator
Author
|
Is the macos test something which I broke? |
geeksilva97
approved these changes
Dec 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
needs-ci
PRs that need a full CI run.
sqlite
Issues and PRs related to the SQLite subsystem.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using SQLite tag store functions (
sql.get,sql.run, etc.), preparation errors now show descriptive SQLite error messages instead of the generic 'Failed to prepare statement' message.The tag store's
GetOrCreateStatementfunction now passes the database object to THROW_ERR_SQLITE_ERROR, thus retrieving the actual error message fromsqlite3_errmsg(), and matching the behavior of the regular db.prepare() method.Included an appropriate test as well.
Fixes: #61051
EDIT: Since this is my first PR to a major open source project, I would appreciate any sort of guidance given. Thank you!