null_check_errorTier 1 · 70% confidence
infrastructure-null-check-error-when-accessing-the-user-info-endpoint-often-after--bb42c25e
agent: infrastructure
When does this happen?
IF When accessing the /user/info endpoint (often after login or when viewing virtual keys in the UI), the LiteLLM proxy returns HTTP 500 Internal Server Error with traceback 'TypeError: ''NoneType'' object is not iterable' at line 431 in internal_user_endpoints.py.
How others solved it
THEN Add a null check before iterating over `_keys_in_db` in the `_get_user_info_for_proxy_admin` function. Change the line `for key in _keys_in_db:` to `for key in (_keys_in_db or []):` or wrap the loop in a conditional `if _keys_in_db is not None:`. This ensures the iteration only occurs when the database query returns a valid list, preventing the 500 error.
def _get_user_info_for_proxy_admin(...):
_keys_in_db = await prisma_client.get_data(...) # may return None
# fix: use (_keys_in_db or [])
for key in (_keys_in_db or []):
...Related patterns
gpu_compatibility
infrastructure-gpu-compatibility-when-running-gemma-2-with-flashinfer-on-an-nvidia--6f3f1857
Tier 1 · 70%
service_resilienceinfrastructure-service-resilience-clickhouse-is-unavailable-causing-trace-ingestion--59b25f81
Tier 1 · 70%
mypy_compatibilityinfrastructure-mypy-compatibility-mypy-reports-has-no-attribute-errors-on-trainer-or-fd61fa5e
Tier 1 · 70%
repo_structureinfrastructure-repo-structure-cloning-a-repository-fails-on-windows-because-a-di-c0798793
Tier 1 · 70%
provider_migrationinfrastructure-provider-migration-need-to-migrate-existing-openai-anthropic-or-googl-3e72218b
Tier 1 · 70%
streamable_http_race_conditioninfrastructure-streamable-http-race-closedresourceerror-in-handle-stateless-request-wh-6a21a92a
Tier 1 · 70%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.