mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix: Add 404 to status_code exemption list to make NotFoundError retry logic reachable
The previous fix was incomplete - NotFoundError (status_code=404) was being caught and raised at line 5283 before reaching the new NotFoundError handling logic at line 5285. Added 404 to the status_code exemption tuple at line 5282, similar to how 401 and 403 are handled, to allow the NotFoundError block to execute and check for multiple deployments. Thanks to @greptile-apps for catching this in the code review.
This commit is contained in:
parent
f1b90cbf2b
commit
dc08db9e33
1 changed files with 2 additions and 2 deletions
|
|
@ -5278,8 +5278,8 @@ class Router:
|
|||
|
||||
status_code = getattr(error, "status_code", None)
|
||||
if status_code is not None and not litellm._should_retry(status_code):
|
||||
# 401/403 are special cases - allow retry if multiple deployments exist (handled below)
|
||||
if status_code not in (401, 403):
|
||||
# 401/403/404 are special cases - allow retry if multiple deployments exist (handled below)
|
||||
if status_code not in (401, 403, 404):
|
||||
raise error
|
||||
|
||||
if isinstance(error, litellm.NotFoundError):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue