From c3546ac0bdd798522cd8f8420c492eebaaa45cfa Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 16 Mar 2026 13:56:20 -0700 Subject: [PATCH] Fix HiFi client not failing over to next instance on HTTP 500 Previously only 502/503/504 triggered instance rotation. A 500 from one instance (e.g. triton.squid.wtf choking on a specific query) would stop the search entirely instead of trying the next instance. --- core/hifi_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hifi_client.py b/core/hifi_client.py index 8048be0e..d9ddaccd 100644 --- a/core/hifi_client.py +++ b/core/hifi_client.py @@ -191,7 +191,7 @@ class HiFiClient: self._rotate_instance(instance) except http_requests.exceptions.HTTPError as e: status = e.response.status_code if e.response is not None else 0 - if status in (502, 503, 504): + if status >= 500: logger.warning(f"HiFi API server error ({status}): {instance}") self._rotate_instance(instance) else: