From 17474b0033dc56724e744b83562aea7651ad2c80 Mon Sep 17 00:00:00 2001 From: Adhoniran Gomes <13842906+adhoniran@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:07:25 -0300 Subject: [PATCH] Improved error message Improved error handling in the get_feed() method to provide a more descriptive error message when NetBox is unable to connect to the feed server. Instead of returning the original exception, we now return a custom error message for better clarity and security. --- netbox/extras/dashboard/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/dashboard/widgets.py b/netbox/extras/dashboard/widgets.py index 0b185d432..9a8161924 100644 --- a/netbox/extras/dashboard/widgets.py +++ b/netbox/extras/dashboard/widgets.py @@ -320,7 +320,7 @@ class RSSFeedWidget(DashboardWidget): response.raise_for_status() except requests.exceptions.RequestException as e: return { - 'error': e, + 'error': 'NetBox is unable to connect to feed server...', } # Parse feed content