Update codebase and add coverage report

Removed an old run configuration, added a new coverage XML report, and updated multiple source files including main.py, middleware, models, routers, services, tests, and utility modules. Also updated pyproject.toml and the lock file. These changes likely include code improvements, test coverage updates, and dependency adjustments.
This commit is contained in:
2025-12-26 14:56:08 +08:00
parent a716b2b0db
commit 54784eea3b
17 changed files with 4583 additions and 271 deletions

View File

@@ -22,16 +22,16 @@ app = FastAPI(
summary=appmeta.summary,
description=appmeta.description,
version=appmeta.BackendVersion,
openapi_tags=appmeta.tags_meta,
license_info=appmeta.license_info,
lifespan=lifespan.lifespan,
debug=appmeta.debug,
openapi_url="/openapi.json" if appmeta.debug else None,
)
@app.exception_handler(Exception)
async def handle_unexpected_exceptions(request: Request, exc: Exception) -> NoReturn:
"""
捕获所有未经处理的fastapi异常,防止敏感信息泄露。
捕获所有未经处理的 FastAPI 异常,防止敏感信息泄露。
"""
l.exception(exc)
l.error(f"An unhandled exception occurred for request: {request.method} {request.url.path}")