{"record":{"id":"12a79fb627b4352f","repo":"chroma-core/chroma","slug":"invalidhttpversion","errorCode":"InvalidHTTPVersion","errorMessage":"HTTP version {http_version} is not supported","messagePattern":"HTTP version (.+?) is not supported","errorType":"http","errorClass":"InvalidHTTPVersion","httpStatus":400,"severity":"error","filePath":"chromadb/server/fastapi/__init__.py","lineNumber":149,"sourceCode":"            content={\"error\": \"InvalidArgumentError\", \"message\": str(e)},\n            status_code=400,\n        )\n    except TypeError as e:\n        return ORJSONResponse(\n            content={\"error\": \"InvalidArgumentError\", \"message\": str(e)},\n            status_code=400,\n        )\n    except Exception as e:\n        logger.exception(e)\n        return ORJSONResponse(content={\"error\": repr(e)}, status_code=500)\n\n\nasync def check_http_version_middleware(\n    request: Request, call_next: Callable[[Request], Any]\n) -> Response:\n    http_version = request.scope.get(\"http_version\")\n    if http_version not in [\"1.1\", \"2\"]:\n        raise InvalidHTTPVersion(f\"HTTP version {http_version} is not supported\")\n    return await call_next(request)\n\n\nD = TypeVar(\"D\", bound=BaseModel, contravariant=True)\n\n\ndef validate_model(model: Type[D], data: Any) -> D:  # type: ignore\n    \"\"\"Used for backward compatibility with Pydantic 1.x\"\"\"\n    try:\n        return model.model_validate(data)  # pydantic 2.x\n    except AttributeError:\n        return model.parse_obj(data)  # pydantic 1.x\n\n\nclass ChromaAPIRouter(fastapi.APIRouter):  # type: ignore\n    # A simple subclass of fastapi's APIRouter which treats URLs with a\n    # trailing \"/\" the same as URLs without. Docs will only contain URLs\n    # without trailing \"/\"s.","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/server/fastapi/__init__.py#L131-L167","documentation":"Error \"HTTP version {http_version} is not supported\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/server/fastapi/__init__.py:149 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}