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

Better error reporting #121

Merged
merged 6 commits into from
Dec 11, 2023
Merged

Better error reporting #121

merged 6 commits into from
Dec 11, 2023

Conversation

confused-Techie
Copy link
Member

This PR adds much better error reporting to the package frontend.

Previously any and all errors are swallowed on the frontend, showing generic, ugly, unstyled error pages. Even worse, not logging the nature of the error.

This PR fixes all of these issues, instead by creating an error page that maintains the style of the site, while also showing the error to the user, in such a way that they may be able to find the issue at hand, or if need be, report a detailed error message to us in the event they see this screen.

Additionally, this PR logs the errors as well.


This PR focuses on adding this behavior to the package list pages, as well as the individual package pages. As these are we are seeing the vast majority of our errors occur.

This PR is also the first step needed in determining what is going wrong with our recurrent rogue instances of the PPR frontend, when an instance goes rogue and causes the chance for failure for users. Since as of now, we are completely in the dark in what goes wrong, having proper logging, and even better being much more transparent about what's gone wrong, will hopefully be the first and final step needed to determine why this happens, and how we can fix it.

src/handlers.js Outdated Show resolved Hide resolved
src/handlers.js Outdated Show resolved Hide resolved
ejs-views/pages/error.ejs Show resolved Hide resolved
confused-Techie and others added 4 commits December 10, 2023 10:30
Co-authored-by: Daeraxa <58074586+Daeraxa@users.noreply.github.com>
Co-authored-by: Daeraxa <58074586+Daeraxa@users.noreply.github.com>
ejs-views/pages/error.ejs Outdated Show resolved Hide resolved
Copy link
Member

@Daeraxa Daeraxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me from a non-code perspective, lets hope it traps something

@confused-Techie
Copy link
Member Author

Thanks for the review @Daeraxa!

@confused-Techie confused-Techie merged commit cad71a0 into main Dec 11, 2023
2 checks passed
@confused-Techie confused-Techie deleted the improved-error-pages branch December 11, 2023 01:52
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

Successfully merging this pull request may close these issues.

2 participants