INNER CODE UNIT · Python
handle_validation_error
Kabanosk/whisper-website · src/exceptions.py:28
def handle_validation_error(request: Request, exc: pydantic.ValidationError) -> JSONResponse:
logger.error("Bad values in the form. {}", exc)
return JSONResponse(status_code=422, content={"detail": exc.errors()})