Skip to content
Snippets Groups Projects
Commit 1d09f560 authored by Alice Heaton's avatar Alice Heaton :speech_balloon:
Browse files

Fix error reporting

parent 596cf4f7
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,10 @@ def render_widget(widget_instance):
# Get context
try:
context = widget.get_context_data(**settings)
except:
logger.exception()
except Exception as e:
logger.exception('Error while fetching widget context data: %s', e)
template_name = 'dashboard/widget-error.html'
context = {}
context['error'] = _('Widget error. See error logs.')
return render_to_string(template_name, context)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment