From c66245b4e7c206e3c89fbce820377089974f1e6a Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 18 Apr 2025 10:19:17 -0400 Subject: [PATCH] update ref to raw_errors due to new version of pydantic https://github.com/meta-llama/llama-stack/commit/37da47ef8ee9234f370b3105d006ef20fb3cacab#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552 Pydantic was updated from v1 to v2 in this commit which caused this breaking change Signed-off-by: Kevin --- llama_stack/distribution/server/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/distribution/server/server.py b/llama_stack/distribution/server/server.py index 9bbb2ce88..6c5e2506c 100644 --- a/llama_stack/distribution/server/server.py +++ b/llama_stack/distribution/server/server.py @@ -92,7 +92,7 @@ async def global_exception_handler(request: Request, exc: Exception): def translate_exception(exc: Exception) -> Union[HTTPException, RequestValidationError]: if isinstance(exc, ValidationError): - exc = RequestValidationError(exc.raw_errors) + exc = RequestValidationError(exc.errors()) if isinstance(exc, RequestValidationError): return HTTPException(