mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
Log warning when team lookup fails during key regeneration duration check
The broad except was silently swallowing errors, which could allow the team max duration to be bypassed if get_team_object raised. Add a warning log so bypasses are visible in audit trails while preserving fail-open behavior consistent with the same team lookup pattern in generate_key_fn. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3ed3255c47
commit
b2ed580eff
1 changed files with 6 additions and 1 deletions
|
|
@ -3415,7 +3415,12 @@ async def _validate_regenerate_key_duration_against_team(
|
|||
parent_otel_span=None,
|
||||
check_db_only=True,
|
||||
)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
verbose_proxy_logger.warning(
|
||||
"Could not look up team %s for duration validation during key regeneration, skipping check: %s",
|
||||
team_id,
|
||||
str(e),
|
||||
)
|
||||
return
|
||||
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue