Skip to content

Commit

Permalink
fix: error count representation
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <me@frostming.com>
  • Loading branch information
frostming committed Jan 18, 2024
1 parent 3bd4b3f commit 95e20f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_bentoml_impl/server/app.py
Expand Up @@ -132,7 +132,7 @@ async def handle_validation_error(self, req: Request, exc: Exception) -> Respons
assert isinstance(exc, pydantic.ValidationError)

data = {
"error": f"{exc.error_count} validation error for {exc.title}",
"error": f"{exc.error_count()} validation error for {exc.title}",
"detail": exc.errors(),
}
return JSONResponse(data, status_code=400)
Expand Down
2 changes: 1 addition & 1 deletion src/_bentoml_sdk/service/factory.py
Expand Up @@ -172,7 +172,7 @@ def import_string(self) -> str:
assert isinstance(import_module, str)
try:
import_module_path = pathlib.Path(import_module).relative_to(
pathlib.Path(self.working_dir)
self.working_dir
)
except ValueError:
raise BentoMLException(
Expand Down

0 comments on commit 95e20f8

Please sign in to comment.