Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 500 error page traceback design is horrible and should be fixed #2607

Closed
lunkwill42 opened this issue Mar 31, 2023 · 0 comments · Fixed by #2628
Closed

The 500 error page traceback design is horrible and should be fixed #2607

lunkwill42 opened this issue Mar 31, 2023 · 0 comments · Fixed by #2628
Assignees
Labels

Comments

@lunkwill42
Copy link
Member

lunkwill42 commented Mar 31, 2023

Describe the bug

Whenever the NAV web UI crashes with a 500 error, the error template used in a non-DEBUG setting provides an expandable section containing a Python traceback. This is provided as a convenience for users to be able to copy&paste this traceback into a bug report.

However, the styling and formatting of the traceback makes it look horrible.

First of all, the presentation seems to throw out both indentation and newlines from each stack frame. This makes the traceback less readable, and it will also not be marked up correctly by the pytb lexer when copied and pasted into a pytb code block in a GitHub issue.

Secondly, each line of the traceback is presented as a separate block with a grey background and frame around the text element, which just looks bad.

To Reproduce

  1. Ensure DJANGO_DEBUG is set to False in nav.conf (reload the web process if necessary)
  2. Browse /500 on the NAV web UI (this is a hidden URL to provoke and test the 500 error page)
  3. Expand the 'View traceback' section
  4. See described issues with presentation

Expected behavior

The traceback should be presented in true copy&paste fashion, with intact newlines and whitespace between file references and code excerpts. Also, the entirety of the text block should be presented as one block element with a single frame, not as multiple blocks.

Screenshots

Screenshot 2023-03-31 at 12-00-21 https __lokalnav uninett no

Environment (please complete the following information):

  • NAV version installed: 5.6.1, master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants