p3: tavily parse errors degrade; retry DNS on search

A 200 with a bad Tavily body is tavily: error, not an empty success
that would cache for the hour. Upstream clients stay in the source
list if DNS is down at boot and retry the pin on Search; /healthz
lists them as unresolved until a pin lands.
This commit is contained in:
2026-09-23 12:22:31 -07:00
parent f748e695b1
commit 429f6b207e
8 changed files with 177 additions and 51 deletions
+5 -3
View File
@@ -110,9 +110,11 @@ func (s *Server) healthz(w http.ResponseWriter, _ *http.Request) {
if s.SelfIP != nil {
out["self_ip"] = s.SelfIP.Status()
}
if s.Search != nil && len(s.Search.Degraded) > 0 {
out["status"] = "degraded"
out["search"] = s.Search.Degraded
if s.Search != nil {
if d := s.Search.Health(); len(d) > 0 {
out["status"] = "degraded"
out["search"] = d
}
}
_ = json.NewEncoder(w).Encode(out)
}