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.
This commit is contained in:
Adhoniran Gomes 2023-10-03 11:07:25 -03:00
parent 786f0cc7f3
commit 17474b0033

View File

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