{"record":{"id":"462e7566fcec4b40","repo":"BerriAI/litellm","slug":"failed-to-list-jwt-key-mappings","errorCode":null,"errorMessage":"Failed to list JWT key mappings.","messagePattern":"Failed to list JWT key mappings\\.","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py","lineNumber":213,"sourceCode":"\n    try:\n        skip: Final = (page - 1) * size\n        mappings: Final = await JWTKeyMappingRepository(prisma_client).table.find_many(\n            skip=skip,\n            take=size,\n            order={\"created_at\": \"desc\"},\n        )\n        total_count: Final = await JWTKeyMappingRepository(prisma_client).table.count()\n        return {\n            \"mappings\": [_to_response(m) for m in mappings],\n            \"total_count\": total_count,\n            \"current_page\": page,\n            \"total_pages\": -(-total_count // size),  # ceiling division\n        }\n    except HTTPException:\n        raise\n    except Exception:\n        raise HTTPException(status_code=500, detail=\"Failed to list JWT key mappings.\")\n\n\n@router.get(\n    \"/jwt/key/mapping/info\",\n    tags=[\"JWT Key Mapping\"],\n    response_model=JWTKeyMappingResponse,\n)\nasync def info_jwt_key_mapping(\n    id: str,\n    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),\n):\n    from litellm.proxy.proxy_server import prisma_client\n\n    # Admin Viewer follows the read-parity rule.\n    if not _user_has_admin_view(user_api_key_dict):\n        raise HTTPException(status_code=403, detail=\"Only proxy admins can get JWT key mapping info\")\n\n    if prisma_client is None:","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py#L195-L231","documentation":"Error \"Failed to list JWT key mappings.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check proxy logs for the underlying database error.","Verify the database connection is healthy, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}