Skip to content

Fix async sync error conversion#220

Open
Flob365 wants to merge 1 commit into
tursodatabase:mainfrom
Flob365:fix-promise-sync-error-conversion
Open

Fix async sync error conversion#220
Flob365 wants to merge 1 commit into
tursodatabase:mainfrom
Flob365:fix-promise-sync-error-conversion

Conversation

@Flob365
Copy link
Copy Markdown

@Flob365 Flob365 commented May 11, 2026

Summary

  • make the promise API sync() await the native promise so rejected errors go through convertError
  • add a regression test for Database.sync() after close() returning the same TypeError as other promise API methods

Fixes #147.

Verification

  • npm exec tsc
  • git diff --check
  • npm test partially: SQLite provider tests passed; libSQL/native tests could not run in this environment because cargo is not installed, so the native libsql-darwin-arm64 binding could not be built.

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.

Bad error handling if caller doesn't await for sync

1 participant