fix: 移除 settings.DEBUG 引用,修复删除 DEBUG 字段后的启动报错

- database.py: echo 改为 False
- main.py: 错误响应直接显示异常信息(不再根据 DEBUG 判断)
- 机器人重复图片回复增加 OCR 识别内容展示
This commit is contained in:
EduBrain Dev
2026-04-14 14:03:01 +08:00
parent 2954f3cb5e
commit 8152494fdc
2 changed files with 3 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ async def global_exception_handler(request: Request, exc: Exception) -> JSONResp
logger.error("未处理异常: %s", exc, exc_info=True)
return JSONResponse(
status_code=500,
content={"detail": "服务器内部错误", "message": str(exc) if settings.DEBUG else "请稍后重试"},
content={"detail": "服务器内部错误", "message": str(exc)},
)