Skip to content

sqlite: less-than-useful error reporting when using SQLTagStore queries #60198

@Renegade334

Description

@Renegade334

SQL error reporting when using the SQLTagStore methods is extremely truncated, compared to conventional statement execution.

const sqlite = require('node:sqlite')
const db = new sqlite.DatabaseSync(':memory:')
const tagStore = db.createTagStore()

db.prepare('SELECT * FROM does_not_exist').all()
// Uncaught [Error: no such table: does_not_exist] {
//   code: 'ERR_SQLITE_ERROR',
//   errcode: 1,
//   errstr: 'SQL logic error'
// }

tagStore.all`SELECT * FROM does_not_exist`
// Uncaught [Error: Failed to prepare statement] { code: 'ERR_SQLITE_ERROR' }

cc: @nodejs/sqlite

Metadata

Metadata

Assignees

No one assigned

    Labels

    sqliteIssues and PRs related to the SQLite subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions