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
|
|
@ -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}"
|
||||
))));
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue