From 942e8c33d08fe1c5d236df46a9154869f3bc03ec Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Wed, 8 May 2024 08:33:40 +0800 Subject: [PATCH] fix: serailization error when request with an invalid json input (#4714) --- src/_bentoml_impl/server/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_bentoml_impl/server/app.py b/src/_bentoml_impl/server/app.py index d1535523a7..f9d4a2d742 100644 --- a/src/_bentoml_impl/server/app.py +++ b/src/_bentoml_impl/server/app.py @@ -411,7 +411,7 @@ async def api_endpoint_wrapper(self, name: str, request: Request) -> Response: log_exception(request) data = { "error": f"{exc.error_count()} validation error for {exc.title}", - "detail": exc.errors(include_context=False), + "detail": exc.errors(include_context=False, include_input=False), } resp = JSONResponse(data, status_code=400) except BentoMLException as exc: