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:
+5
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user