{"record":{"id":"1ceeb303409c1593","repo":"BerriAI/litellm","slug":"no-token-passed-in-token-token","errorCode":null,"errorMessage":"No token passed in. Token={token}","messagePattern":"No token passed in\\. Token=(.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"litellm/proxy/utils.py","lineNumber":3596,"sourceCode":"        parent_otel_span: Span | None = None,\n        proxy_logging_obj: ProxyLogging | None = None,\n        budget_id_list: list[str] | None = None,\n        check_deprecated: bool = True,\n    ):\n        args_passed_in: Final = locals()\n        start_time: Final = time.time()\n        hashed_token: str | None = None\n        try:\n            response: Any = None\n            if (token is not None and table_name is None) or (table_name is not None and table_name == \"key\"):\n                # check if plain text or hash\n                if token is not None:\n                    if isinstance(token, str):\n                        hashed_token = _hash_token_if_needed(token=token)\n                        verbose_proxy_logger.debug(\"PrismaClient: find_unique for token: %s\", hashed_token)\n                if query_type == \"find_unique\" and hashed_token is not None:\n                    if token is None:\n                        raise HTTPException(\n                            status_code=400,\n                            detail={\"error\": f\"No token passed in. Token={token}\"},\n                        )\n                    response = await VerificationTokenRepository(self).table.find_unique(\n                        where={\"token\": hashed_token},\n                        include={\"litellm_budget_table\": True},\n                    )\n                    if response is not None:\n                        # for prisma we need to cast the expires time to str\n                        if response.expires is not None and isinstance(response.expires, datetime):\n                            response.expires = response.expires.isoformat()\n                    else:\n                        # Token does not exist.\n                        raise HTTPException(\n                            status_code=status.HTTP_401_UNAUTHORIZED,\n                            detail=f\"Authentication Error: invalid user key - user key does not exist in db. User Key={token}\",\n                        )\n                elif query_type == \"find_all\" and user_id is not None:","sourceCodeStart":3578,"sourceCodeEnd":3614,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/utils.py#L3578-L3614","documentation":"Defensive guard in the PrismaClient find_unique path for key verification: the query type was resolved to 'key' but the token value itself is None, so there is no credential to look up. Indicates a malformed internal call rather than a bad key; the Token=None is echoed in the message.","triggerScenarios":"Thrown at litellm/proxy/utils.py:3596 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include an API key in the Authorization header (Bearer <key>) of the request."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}