Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Log Failed to fetch attestation as error #3272

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions crates/daemon/src/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,16 @@ impl Actor {

Ok(())
},
|e| async move {
tracing::debug!("Failed to fetch attestation: {:#}", e);
move |e| async move {
let now = OffsetDateTime::now_utc();

// If the event is more than 10 minutes in the past we expect an attestation to
// be available and log an error if we can't fetch it
if now > event_id.timestamp() + Duration::minutes(10) {
tracing::error!("Failed to fetch attestation for {event_id}: {e:#}");
} else {
tracing::debug!("Failed to fetch attestation for {event_id}: {e:#}");
}
},
)
}
Expand Down