aminghadersohi commented on code in PR #45849:
URL: https://github.com/apache/superset/pull/45849#discussion_r4416502070


##########
superset/mcp_service/chart/tool/get_chart_data.py:
##########
@@ -1310,7 +1313,15 @@ async def _get_chart_data(  # noqa: C901
                     type(data_error).__name__,
                 )
             )
-            logger.error("Data retrieval error for chart %s", chart_id)
+            if isinstance(data_error, ChartDataQueryFailedError):
+                # The chart's query failed in the underlying database (bad
+                # column, missing table, ...). That is an expected data-side
+                # failure already returned to the caller, not a service fault.

Review Comment:
   Nit: Connection refusal and authentication failures also become 
`ChartDataQueryFailedError`, so this branch is not limited to user-side query 
mistakes.
   
   ```suggestion
                   # Query execution failed in the underlying database; this 
also
                   # covers connectivity and authentication failures. The caller
                   # receives the failure as a DataError.
   ```



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