mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
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:
parent
17474b0033
commit
d42a428d66
@ -319,8 +319,9 @@ class RSSFeedWidget(DashboardWidget):
|
|||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
|
feed_error = 'NetBox is unable to connect to feed server...'
|
||||||
return {
|
return {
|
||||||
'error': 'NetBox is unable to connect to feed server...',
|
'error': feed_error,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse feed content
|
# Parse feed content
|
||||||
|
Loading…
Reference in New Issue
Block a user