chroma-core/chroma · error · InvalidHTTPVersion
InvalidHTTPVersion
InvalidHTTPVersion
Error message
HTTP version {http_version} is not supported What it means
Error "HTTP version {http_version} is not supported" thrown in chroma-core/chroma.
Source
Thrown at chromadb/server/fastapi/__init__.py:149
content={"error": "InvalidArgumentError", "message": str(e)},
status_code=400,
)
except TypeError as e:
return ORJSONResponse(
content={"error": "InvalidArgumentError", "message": str(e)},
status_code=400,
)
except Exception as e:
logger.exception(e)
return ORJSONResponse(content={"error": repr(e)}, status_code=500)
async def check_http_version_middleware(
request: Request, call_next: Callable[[Request], Any]
) -> Response:
http_version = request.scope.get("http_version")
if http_version not in ["1.1", "2"]:
raise InvalidHTTPVersion(f"HTTP version {http_version} is not supported")
return await call_next(request)
D = TypeVar("D", bound=BaseModel, contravariant=True)
def validate_model(model: Type[D], data: Any) -> D: # type: ignore
"""Used for backward compatibility with Pydantic 1.x"""
try:
return model.model_validate(data) # pydantic 2.x
except AttributeError:
return model.parse_obj(data) # pydantic 1.x
class ChromaAPIRouter(fastapi.APIRouter): # type: ignore
# A simple subclass of fastapi's APIRouter which treats URLs with a
# trailing "/" the same as URLs without. Docs will only contain URLs
# without trailing "/"s.View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/server/fastapi/__init__.py:149 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/12a79fb627b4352f.
Report an issue: GitHub.