fix: Treat any non-ok response as a server error in sender

Otherwise we never back off sending failed requests
This commit is contained in:
timedout
2026-08-18 02:55:56 +01:00
parent a012a42981
commit 38133db05b
+2 -2
View File
@@ -152,8 +152,8 @@ async fn handle_response<'a>(
debug!("{dest} is now unhealthy & stale due to a connect error: {e:?}");
self.services.federation.mark_destination_stale(dest);
self.services.federation.hit_unhealthy(dest.clone());
} else if e.status_code().is_server_error() {
debug!("{dest} is now unhealthy due to server error response: {e:?}");
} else if e.status_code() != StatusCode::OK {
debug!("{dest} is now unhealthy due to error response: {e:?}");
self.services.federation.hit_unhealthy(dest.clone());
}
}