diff --git a/CHANGELOG.md b/CHANGELOG.md index 3770d32949..ba0bb4bc38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ found in the [HISTORY](HISTORY) file. - Handle invalid IP address input in ipdevinfo device searches gracefully, rather then crashing with a 500 error ([#2589](https://github.com/Uninett/nav/issues/2589), [#2590](https://github.com/Uninett/nav/pull/2590)) - Fix broken links to room details from room report for rooms with spaces in their names ([#2592](https://github.com/Uninett/nav/issues/2592), [#2593](https://github.com/Uninett/nav/pull/2593)) - Catch Validation error in filtering of prefixes in API ([#2606](https://github.com/Uninett/nav/issues/2606), [#2608](https://github.com/Uninett/nav/pull/2608)) +- Redesign the 500 Error page so that the exception traceback if formatted as one ## [5.6.0] - 2023-01-20 diff --git a/python/nav/django/views.py b/python/nav/django/views.py index 8ad4fc830b..4e0fb4e017 100644 --- a/python/nav/django/views.py +++ b/python/nav/django/views.py @@ -27,14 +27,10 @@ def custom_500(request): template = loader.get_template('500.html') - type, value, tb = sys.exc_info() - return HttpResponseServerError( template.render( context={ - 'type': type.__name__, - 'value': value, - 'traceback': traceback.format_exception(type, value, tb), + 'traceback': traceback.format_exc(), }, request=request, ) diff --git a/python/nav/web/templates/500.html b/python/nav/web/templates/500.html index ba4678e1d1..3be0e20194 100644 --- a/python/nav/web/templates/500.html +++ b/python/nav/web/templates/500.html @@ -37,11 +37,7 @@

Ouch...

View traceback