icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
55 stars 62 forks source link

Create an Error Page #968

Open KevinWu098 opened 2 months ago

KevinWu098 commented 2 months ago

We should handle errors more cleanly than allowing the default error page to show to the user.

One error that pops to mind is the dynamic module issue (when we update the site, but users still have an older version of the site open).

Screenshot 2024-06-03 at 2 40 56 PM
JackyZzZz commented 2 months ago

For update, do you mean when we merge new commits into the production?

JackyZzZz commented 2 months ago

And we notify the user that they should update or refresh the page to catch up? Is that something you are referring to?

KevinWu098 commented 2 months ago

For update, do you mean when we merge new commits into the production?

Yup; I was told that the reason why we sometimes see a dynamic module not imported error is that the site was updated

But that’s not specifically what this issue wants to cover; in general, we should have our own custom error page rather than the generic

JackyZzZz commented 2 months ago

Could you give an example of when a generic error page triggers lol. I haven't look into it but it sounds like an interesting issue

KevinWu098 commented 2 months ago

Could you give an example of when a generic error page triggers lol. I haven't look into it but it sounds like an interesting issue

My understanding is that the error about dynamic import of module is caused when you have an outdated/cached version of the site? It's not something we can fix, I don't think, but if you've ever seen a gray screen with a white bar saying something about a JS import, that's what I'm talking about.

As for the fix, this issue is mainly suggesting that we mitigate user confusion with a more proper error page (perhaps with bonus text for common errors/why they happen)

MinhxNguyen7 commented 2 months ago

@JackyZzZz To be clear, it doesn't really matter what triggers the error. We just need to have an error page for when something happens and what they should do (try to reload).