Skip to content

database transaction's error is not properly handled #478

@Keith-CY

Description

@Keith-CY

Describe the bug

We've got a case that sync got stuck at the same point after re-sync and restart. In the debug info the following messages repeated

[2025-08-20T22:00:23.497Z] [info]  Database:	saved synced block #16602184
[2025-08-20T22:00:35.936Z] [warn]  status tracking error: QueryFailedError: SQLITE_ERROR: no such savepoint: typeorm_2
[2025-08-20T22:00:35.936Z] [error] Sync:ChildProcess: [2025-08-20T22:00:35.936Z] [warn]  status tracking error: QueryFailedError: SQLITE_ERROR: no such savepoint: typeorm_2

[2025-08-20T22:00:35.937Z] [error] Unhandled Rejection in task:	Reason: QueryFailedError: SQLITE_ERROR: no such savepoint: typeorm_2
    at Statement.handler (C:\Users\Username\AppData\Local\Programs\Neuron\resources\app.asar\node_modules\typeorm\driver\sqlite\SqliteQueryRunner.js:81:26)
    at Statement.replacement (C:\Users\Username\AppData\Local\Programs\Neuron\resources\app.asar\node_modules\sqlite3\lib\trace.js:25:27)
    at Statement.replacement (C:\Users\Username\AppData\Local\Programs\Neuron\resources\app.asar\node_modules\sqlite3\lib\trace.js:25:27)

Obviously there's a reproducible error in the database transaction but the underlying error was concealed by Unhandled Rejection in task: Reason: QueryFailedError: SQLITE_ERROR: no such savepoint: typeorm_2

Expected behavior

The transaction error is properly handled and the error stack is printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions