Skip to content

fix(ext/node): Add SQLite error details (#28289) #28431

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

Merged
merged 8 commits into from
Mar 22, 2025

Conversation

c00kie17
Copy link
Contributor

@c00kie17 c00kie17 commented Mar 8, 2025

Improves SQLite error reporting by including err_code, err_str, matching Node.js behavior.

Fixes #28289

@petamoriken
Copy link
Contributor

@c00kie17 You can format all of the code by running ./tools/format.js.
FYI: https://docs.deno.com/runtime/contributing/#submitting-a-pr-to-deno

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be done in sqlite/session.rs and sqlite/statement.rs too; we use raw FFI there so it will need a variant of from_rusqlite_with_details that takes error codes directly.

@c00kie17
Copy link
Contributor Author

Okay, I can work on that.

@c00kie17 c00kie17 force-pushed the enhance-sqlite-error-handling branch from 9230508 to 3a11212 Compare March 21, 2025 18:38
@c00kie17 c00kie17 requested a review from littledivy March 21, 2025 19:17
Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@littledivy littledivy merged commit 208992a into denoland:main Mar 22, 2025
18 checks passed
littledivy pushed a commit that referenced this pull request Mar 28, 2025
Improves SQLite error reporting by including `err_code`, `err_str`,
matching Node.js behavior.

Fixes #28289
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.

node:sqlite unique constraint exception parity
3 participants