Open
Description
When using Bun as the runtime and a local DB file, whenever a SqliteError is thrown, a TypeError is actually thrown.
TypeError: First argument must be an Error object
at new SqliteError (/Users/simon/Code/Github/project/node_modules/libsql/sqlite-error.js:22:8)
at convertError (/Users/simon/Code/Github/project/node_modules/libsql/index.js:60:10)
at run (/Users/simon/Code/Github/project/node_modules/libsql/index.js:353:10)
I dug a little and found a few things:
- When using a Turso DB, it's fine
- When using Node + local DB, it's fine
- It's triggered at this line: https://github.com/tursodatabase/libsql-js/blob/main/sqlite-error.js#L14
Not sure why it works with a Turso DB. I suspect that Node & Bun validates Error differently.
Metadata
Metadata
Assignees
Labels
No labels