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")