Skip to content

SQLiteError triggers TypeError in Bun #187

@depsimon

Description

@depsimon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions