Files
TREK/server/tests/unit
Isaias Tavares 2318308674 fix(db): fail plugin-data erasure on errors other than a missing table
deletePluginUserData swallowed every error from its three DELETEs, so a
lost connection or a refused statement on Postgres looked like success
and left the user's plugin rows behind. It now skips only a table that
does not exist, the case its comment described (a slimmed-down schema),
and rethrows anything else. The missing-table test moves to
isMissingTableError in migration-utils, which already decided this for
the migrations: the ORM maps SQLite's "no such table" and Postgres's
42P01 to TableNotFoundException. The docstring keeps the intent and drops
the plan history.
2026-11-05 01:47:28 -03:00
..