Skip to content

Commit

Permalink
better logging on replay fetch error
Browse files Browse the repository at this point in the history
  • Loading branch information
psFried committed Sep 21, 2023
1 parent 184b521 commit 525372c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ async fn ingest_replays(
let meta = serde_json::json!({ "parent_groups": lineage });

for replay in replays {
let mut replay_json = fetcher.fetch_replay(&replay.id).await?;
let mut replay_json = match fetcher.fetch_replay(&replay.id).await {
Ok(rp) => rp,
Err(err) => {
tracing::warn!(?lineage, ?binding, ?replay, error = ?err, "failed to fetch replay");
return Err(err);
}
};
replay_json
.as_object_mut()
.expect("replay must be an object")
Expand Down

0 comments on commit 525372c

Please sign in to comment.