From 991c8e808310adf4eb51e0def51e3a813ad13bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=20=E6=9F=8F?= Date: Sun, 19 Nov 2023 13:24:08 +0900 Subject: [PATCH] add api.log&errorlog->db --- backend/app/api/api_v1/routers/kintone.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/api/api_v1/routers/kintone.py b/backend/app/api/api_v1/routers/kintone.py index e46057a..b5f3050 100644 --- a/backend/app/api/api_v1/routers/kintone.py +++ b/backend/app/api/api_v1/routers/kintone.py @@ -11,6 +11,7 @@ from pathlib import Path from app.db.session import SessionLocal from app.db.crud import get_flows_by_app,get_activedomain from app.core.auth import get_current_active_user,get_current_user +from app.core.apiexception import APIException kinton_router = r = APIRouter() @@ -319,7 +320,7 @@ async def upload(files:t.List[UploadFile] = File(...)): print(df) dataframes.append(df) except Exception as e: - raise HTTPException(status_code=400, detail=f"Error occurred while parsing file {file.filename}: {str(e)}") + raise APIException(Request.,'' ,f"Error occurred while uploading file {file.filename}: {str(e)}") else: raise HTTPException(status_code=400, detail=f"File {file.filename} is not an Excel file")