diff --git a/fastapi_amis_admin/crud/base.py b/fastapi_amis_admin/crud/base.py index b27b9ee..7d8ff1b 100644 --- a/fastapi_amis_admin/crud/base.py +++ b/fastapi_amis_admin/crud/base.py @@ -216,6 +216,8 @@ def error_execute_sql(self, request: Request, error: Exception): status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail="Key already exists", ) from error + elif isinstance(error, HTTPException): + raise error raise HTTPException( status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=f"Error Execute SQL:{error}",