INNER CODE UNIT · Python

validation_exception_handler

LoD-Dawn/Fast-Vben-Admin · backend/app/main.py:204

async def validation_exception_handler(
    _request: Request, exc: RequestValidationError
) -> JSONResponse:
    return error_response(
        status_code=422,
        code="VALIDATION_ERROR",
        message="Request validation failed",
        details={"errors": exc.errors()},
    )


# Set all CORS enabled origins
if settings.all_cors_origins:
    app.add_middleware(
        CORSMiddleware,
        allow_origins=settings.all_cors_origins,
        allow_credentials=True,
        allow_methods=["*"],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…