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.
This commit is contained in:
Broque Thomas 2026-03-16 13:56:20 -07:00
parent e02ad6e86e
commit c3546ac0bd

View file

@ -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: