From ed70432254ed799ec83233a6f902f0452b71de65 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 27 May 2024 08:58:02 +0200 Subject: [PATCH] Decrease visualization log level Minor followup to https://github.com/galaxyproject/galaxy/pull/18211. If we've got a MessageException I don't think we need to log this as an error, since we're also showing a reasonable message to the user. --- lib/galaxy/webapps/galaxy/controllers/visualization.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/visualization.py b/lib/galaxy/webapps/galaxy/controllers/visualization.py index b70fc5ad6f85..abd650b5475c 100644 --- a/lib/galaxy/webapps/galaxy/controllers/visualization.py +++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py @@ -11,6 +11,7 @@ model, web, ) +from galaxy.exceptions import MessageException from galaxy.managers.hdas import HDAManager from galaxy.managers.sharable import SlugBuilder from galaxy.model.base import transaction @@ -258,7 +259,10 @@ def _handle_plugin_error(self, trans, visualization_name, exception): """ Log, raise if debugging; log and show html message if not. """ - log.exception("error rendering visualization (%s)", visualization_name) + if isinstance(exception, MessageException): + log.debug("error rendering visualization (%s): %s", visualization_name, exception) + else: + log.exception("error rendering visualization (%s)", visualization_name) if trans.debug: raise exception return trans.show_error_message(