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

Handle application errors more gracefully #73

Open
MattF-NSIDC opened this issue Jul 31, 2023 · 2 comments · May be fixed by #132
Open

Handle application errors more gracefully #73

MattF-NSIDC opened this issue Jul 31, 2023 · 2 comments · May be fixed by #132
Labels
enhancement New feature or request impact/ui Impacts the the user interface

Comments

@MattF-NSIDC
Copy link
Member

MattF-NSIDC commented Jul 31, 2023

In dev (FLASK_DEBUG=true), showing a traceback is good. If we are not in dev, we currently show a 500 internal server error page.

To do better than that, we should show something to the user that is useful for reporting the error ("who do I call?"), describes how to recover, and enables them to continue using the app.

We should set this up so all exceptions generated by requests are caught. Does Flask have a built-in method to intercept request exceptions?

Probably a medium-term thing?

@MattF-NSIDC MattF-NSIDC added enhancement New feature or request impact/ui Impacts the the user interface labels Jul 31, 2023
@rmarow
Copy link
Contributor

rmarow commented Aug 21, 2023

@rmarow rmarow linked a pull request Sep 7, 2023 that will close this issue
@mfisher87
Copy link
Member

mfisher87 commented Mar 13, 2024

TODO: We need to figure out how to handle errors with HTMX. E.g. when you delete a node from the node library, it will fail if that node is used in an assessment. It won't tell you why, the button just does nothing. How can we get the server-side error message (e.g. "Can't delete because this node is associated with surveys X, Y, Z") back into the app for the user to see?

Probably by returning some HTML and headers that tell HTMX to populate some reserved space with an error message?

And for the future user experience, what do we suggest as a remedy for the user? E.g. "If you want to hide the node from the library, archive it instead."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request impact/ui Impacts the the user interface
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants