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

Don't allow error pages to raise errors #35216

Open
3 tasks
Tracked by #35144
timmc-edx opened this issue Aug 1, 2024 · 1 comment
Open
3 tasks
Tracked by #35144

Don't allow error pages to raise errors #35216

timmc-edx opened this issue Aug 1, 2024 · 1 comment

Comments

@timmc-edx
Copy link
Contributor

The generic error views for 403, 404, and 500 can themselves raise exceptions, resulting in users not having intelligible error pages and making it harder for service operators to understand what is happening.

See #35151 for some past fallout of these problems. Note in particular that bad translations can cause error pages to raise exceptions at any time.

Acceptance criteria:

  • Each of the static template views in lms/djangoapps/static_template_view/views.py that manages some kind of error condition must have a try/except and a fallback to a hardcoded string. No DB calls, translations, etc. in the hardcoded value.
  • In each place where an error template has logic that makes DB calls, relies on user/session information, translations, etc., there is a try/except that can substitute in an acceptable fallback value.
  • Optionally: Mark the current span as having an error, using record_exception from edx-django-utils
@robrap
Copy link
Contributor

robrap commented Aug 1, 2024

Do we know if this affects other IDAs (public or private) and the cookiecutter used to create IDAs? Something to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants