update ref to raw_errors due to new version of pydantic

37da47ef8e (diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552)
Pydantic was updated from v1 to v2 in this commit which caused this
breaking change

Signed-off-by: Kevin <kpostlet@redhat.com>
This commit is contained in:
Kevin 2025-04-18 10:19:17 -04:00
parent 2976b5d992
commit c66245b4e7

View file

@ -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(