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

@ -498,10 +498,14 @@ fn collect_import_result(
tracing::warn!(path = %path.display(), error = %e, "failed to import file");
results.push(Err(e));
},
Err(e) => {
tracing::error!(error = %e, "import task panicked");
Err(join_err) => {
if join_err.is_panic() {
tracing::error!(error = %join_err, "import task panicked");
} else {
tracing::warn!(error = %join_err, "import task was cancelled");
}
results.push(Err(PinakesError::InvalidOperation(format!(
"import task panicked: {e}"
"import task failed: {join_err}"
))));
},
}