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

Show Error summary on Error page #10413

Open
mekarpeles opened this issue Jan 31, 2025 · 0 comments · May be fixed by #10414
Open

Show Error summary on Error page #10413

mekarpeles opened this issue Jan 31, 2025 · 0 comments · May be fixed by #10414
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]

Comments

@mekarpeles
Copy link
Member

mekarpeles commented Jan 31, 2025

Proposal

Often times when a patron hits an error, we give them an error number but no information about what error occurred. At minimum, for librarians and greater permission, we should show them some safe version of an error they can use to communicate with staff.

def internalerror():
name = save_error()
# TODO: move this stats stuff to plugins\openlibrary\stats.py
# Can't have sub-metrics, so can't add more info
openlibrary.core.stats.increment('ol.internal-errors')
increment_error_count('ol.internal-errors-segmented')
# TODO: move this to plugins\openlibrary\sentry.py
from openlibrary.plugins.openlibrary.sentry import sentry
if sentry.enabled:
sentry.capture_exception_webpy()
if features.is_enabled('debug'):
raise web.debugerror()
else:
msg = render.site(render.internalerror(name))
raise web.internalerror(web.safestr(msg))

The error is here within save_error which could return name, error:

error = web.safestr(web.djangoerror())

Justification

Breakdown

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

@mekarpeles mekarpeles added Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Priority: 2 Important, as time permits. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] labels Jan 31, 2025
@mekarpeles mekarpeles added this to the Sprint 2025-02 milestone Jan 31, 2025
@mekarpeles mekarpeles linked a pull request Jan 31, 2025 that will close this issue
@jimchamp jimchamp removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants