You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2025/10/25 00:50:32 UTC

(superset) 01/01: refactor(dashboard): use logger.exception for cleaner error logging

This is an automated email from the ASF dual-hosted git repository.

elizabeth pushed a commit to branch thumbnail-error
in repository https://gitbox.apache.org/repos/asf/superset.git

commit c563e9414f1f51b2073cad0eecc69cd1b0575662
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Fri Oct 24 16:44:13 2025 -0700

    refactor(dashboard): use logger.exception for cleaner error logging
    
    Replace logger.error with exc_info=True with logger.exception() for more concise and idiomatic exception logging in thumbnail retrieval.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <no...@anthropic.com>
---
 superset/dashboards/api.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py
index 8f62d3f9af..a0482dcf5a 100644
--- a/superset/dashboards/api.py
+++ b/superset/dashboards/api.py
@@ -1361,11 +1361,10 @@ class DashboardRestApi(BaseSupersetModelRestApi):
         except ScreenshotImageNotAvailableException:
             return self.response_404()
         except Exception as ex:  # pylint: disable=broad-except
-            logger.error(
+            logger.exception(
                 "Error retrieving thumbnail for dashboard %s: %s",
                 str(dashboard.id),
                 str(ex),
-                exc_info=True,
             )
             return self.response_404()
         return Response(