pinakes-core: add error context to tag and collection writes; map serde_json errors to Serialization variant

pinakes-core: distinguish task panics from cancellations in import error
  handling
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icf5686f34144630ebf1935c47b3979156a6a6964
This commit is contained in:
raf 2026-03-11 17:08:24 +03:00
commit 592a9bcc47
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
3 changed files with 65 additions and 20 deletions

View file

@ -4295,6 +4295,11 @@ impl StorageBackend for PostgresBackend {
&self,
metadata: &crate::model::BookMetadata,
) -> Result<()> {
if metadata.media_id.0.is_nil() {
return Err(PinakesError::Database(
"upsert_book_metadata: media_id must not be nil".to_string(),
));
}
let mut client = self
.pool
.get()