Fix showing a suitable error page for diffs with internal errors.

Review Request #7427 — Created June 15, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
33d433c...

Reviewers

When hitting an internal error, we'd attempt to render the diff viewer
page with the error information. This ended up breaking though, since
later in the page, the JavaScript block would try to access context
variables that didn't exist, causing an entirely different error to
display.

We no longer execute that section of the block when showing an error,
allowing the error information to show through.

I've also cleaned up the presentation just a bit so that it's not
completely meaningless, and so that we don't show the traceback unless
it's being viewed by a superuser. This will help prevent some leakage of
information here, while allowing admins to get the details.

Triggered an error and viewed the page as an admin, as as a normal user.
Saw the two versions of the page. I no longer got the Django traceback
about the context variables.

    Loading...