mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-26 15:32:18 +00:00
Handle other request in nodeinfo job
This commit is contained in:
parent
debec2875d
commit
e1137fadd8
|
@ -41,10 +41,18 @@ impl QueryNodeinfo {
|
|||
let scheme = self.actor_id.scheme_str();
|
||||
let well_known_uri = iri!(format!("{}://{}/.well-known/nodeinfo", scheme, authority));
|
||||
|
||||
let well_known = state
|
||||
let well_known = match state
|
||||
.requests
|
||||
.fetch_json::<WellKnown>(well_known_uri.as_str())
|
||||
.await?;
|
||||
.await
|
||||
{
|
||||
Ok(well_known) => well_known,
|
||||
Err(e) if e.is_breaker() => {
|
||||
tracing::debug!("Not retrying due to failed breaker");
|
||||
return Ok(());
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
|
||||
let href = if let Some(link) = well_known.links.into_iter().find(|l| l.rel.is_supported()) {
|
||||
link.href
|
||||
|
|
Loading…
Reference in New Issue
Block a user