Remove unused thiserror dependency from db crate (or land db::Error) #8

Closed
opened 2026-06-02 07:07:49 +00:00 by logaritmisk · 1 comment
Owner

crates/db/Cargo.toml declares thiserror but nothing in db/src uses it — the repositories (audit, vocab, authority) all return raw sqlx::Error. It's been an unused dependency since the foundation (Plan 0).

Either drop it, or land the db::Error type it was presumably reserved for (a typed error enum at the db boundary, wrapping sqlx::Error + decode/not-found cases). Decide when the repositories need richer error semantics than raw sqlx::Error.

Source: Plan 2 (vocab/authorities) final review — pre-existing, non-blocking.

`crates/db/Cargo.toml` declares `thiserror` but nothing in `db/src` uses it — the repositories (`audit`, `vocab`, `authority`) all return raw `sqlx::Error`. It's been an unused dependency since the foundation (Plan 0). Either drop it, or land the `db::Error` type it was presumably reserved for (a typed error enum at the db boundary, wrapping `sqlx::Error` + decode/not-found cases). Decide when the repositories need richer error semantics than raw `sqlx::Error`. _Source: Plan 2 (vocab/authorities) final review — pre-existing, non-blocking._
Author
Owner

Closing as obsolete: thiserror is no longer unused in the db crate. crates/db/src/catalog.rs derives thiserror::Error for FieldError and VisibilityError (added during the admin-CRUD work, after this issue was filed). The dependency is now legitimately used, so there's nothing to remove. If a unified db::Error boundary type is wanted later, that's a separate, larger refactor.

Closing as obsolete: `thiserror` is no longer unused in the `db` crate. `crates/db/src/catalog.rs` derives `thiserror::Error` for `FieldError` and `VisibilityError` (added during the admin-CRUD work, after this issue was filed). The dependency is now legitimately used, so there's nothing to remove. If a unified `db::Error` boundary type is wanted later, that's a separate, larger refactor.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logaritmisk/biggus-dickus#8