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:
parent
8f2b44b50c
commit
592a9bcc47
3 changed files with 65 additions and 20 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue