tangled
alpha
login
or
join now
ptr.pet
/
hydrant
28
fork
atom
at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol
atproto
indexer
rust
fjall
28
fork
atom
overview
issues
6
pulls
pipelines
[backfill] print root cause of transport errors
ptr.pet
1 month ago
75d3bc5c
0a89d674
verified
This commit was signed with the committer's
known signature
.
ptr.pet
SSH Key Fingerprint:
SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw=
+11
-1
1 changed file
expand all
collapse all
unified
split
src
backfill
mod.rs
+11
-1
src/backfill/mod.rs
···
5
use crate::types::{AccountEvt, BroadcastEvent, RepoState, RepoStatus, ResyncState, StoredEvent};
6
use futures::TryFutureExt;
7
use jacquard::api::com_atproto::sync::get_repo::{GetRepo, GetRepoError};
0
8
use jacquard::types::cid::Cid;
9
use jacquard::types::did::Did;
10
use jacquard::{CowStr, IntoStatic, prelude::*};
···
132
.into_diagnostic()??;
133
}
134
Err(e) => {
135
-
error!("backfill failed for {did}: {e}");
0
0
0
0
0
0
0
0
0
136
let did_key = keys::repo_key(&did);
137
138
// 1. get current retry count
···
5
use crate::types::{AccountEvt, BroadcastEvent, RepoState, RepoStatus, ResyncState, StoredEvent};
6
use futures::TryFutureExt;
7
use jacquard::api::com_atproto::sync::get_repo::{GetRepo, GetRepoError};
8
+
use jacquard::error::{ClientError, ClientErrorKind};
9
use jacquard::types::cid::Cid;
10
use jacquard::types::did::Did;
11
use jacquard::{CowStr, IntoStatic, prelude::*};
···
133
.into_diagnostic()??;
134
}
135
Err(e) => {
136
+
{
137
+
if e.downcast_ref::<ClientError>()
138
+
.map_or(false, |e| matches!(e.kind(), ClientErrorKind::Transport))
139
+
{
140
+
let reason = e.root_cause();
141
+
error!("backfill failed for {did}: {e}: {reason}");
142
+
} else {
143
+
warn!("backfill failed for {did}: {e}");
144
+
}
145
+
}
146
let did_key = keys::repo_key(&did);
147
148
// 1. get current retry count