feat: add set phone
This commit is contained in:
10
src/presentation/handlers/validation_handler.py
Normal file
10
src/presentation/handlers/validation_handler.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from fastapi import Request
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from fastapi.responses import ORJSONResponse
|
||||
|
||||
|
||||
async def validation_exception_handler(_request: Request, exc: RequestValidationError) -> ORJSONResponse:
|
||||
return ORJSONResponse(
|
||||
status_code=422,
|
||||
content={'detail': exc.errors()},
|
||||
)
|
||||
Reference in New Issue
Block a user