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:
parent
e02ad6e86e
commit
c3546ac0bd
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue