BerriAI/litellm · error · HTTPException
Only proxy admins can get JWT key mapping info
Error message
Only proxy admins can get JWT key mapping info
What it means
Error "Only proxy admins can get JWT key mapping info" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py:229
raise
except Exception:
raise HTTPException(status_code=500, detail="Failed to list JWT key mappings.")
@router.get(
"/jwt/key/mapping/info",
tags=["JWT Key Mapping"],
response_model=JWTKeyMappingResponse,
)
async def info_jwt_key_mapping(
id: str,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
from litellm.proxy.proxy_server import prisma_client
# Admin Viewer follows the read-parity rule.
if not _user_has_admin_view(user_api_key_dict):
raise HTTPException(status_code=403, detail="Only proxy admins can get JWT key mapping info")
if prisma_client is None:
raise HTTPException(status_code=500, detail="Database not connected")
try:
mapping: Final = await JWTKeyMappingRepository(prisma_client).table.find_unique(where={"id": id})
if mapping is None:
raise HTTPException(status_code=404, detail="Mapping not found")
return _to_response(mapping)
except HTTPException:
raise
except Exception:
raise HTTPException(status_code=500, detail="Failed to get JWT key mapping info.")
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Authenticate with a proxy admin API key.
- Ask a proxy admin to retrieve the mapping info.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py:229 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/65027db8b054d1b1.
Report an issue: GitHub.