codeant-ai-for-open-source[bot] commented on code in PR #43129:
URL: https://github.com/apache/superset/pull/43129#discussion_r3785318719


##########
superset/mcp_service/dataset/tool/create_virtual_dataset.py:
##########
@@ -213,6 +214,17 @@ async def create_virtual_dataset(
             url=None,
             error=f"Failed to update dataset metadata (creation rolled back): 
{exc}",
         )
+    except SupersetGenericDBErrorException as exc:
+        await ctx.warning(f"Virtual dataset SQL failed validation: {exc}")
+        return CreateVirtualDatasetResponse(
+            id=None,
+            dataset_name=request.dataset_name,
+            sql=request.sql,
+            database_id=request.database_id,
+            columns=[],
+            url=None,
+            error=f"Dataset SQL could not be executed: {exc}",

Review Comment:
   ✅ **Customized review instruction saved!**
   
   **Instruction:**
   > Do not flag returning database-driver diagnostics in this tool when 
callers have already passed dataset write and database/SQL access checks; 
preserve the driver message to support agent self-correction while logging 
tracebacks server-side.
   
   **Applied to:**
     - `superset/mcp_service/dataset/tool/create_virtual_dataset.py`
   
   ---
   💡 *To manage or update this instruction, visit: [CodeAnt AI 
Settings](https://app.codeant.ai/org/settings/learnings)*



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to