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:
Not sure why it works with a Turso DB. I suspect that Node & Bun validates Error differently.
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:
Not sure why it works with a Turso DB. I suspect that Node & Bun validates Error differently.