overthesun / simoc

A scalable model of an interactive, off-world community
https://ngs.simoc.space/
GNU General Public License v3.0
2 stars 2 forks source link

Server Overload should Fail Gracefully #181

Open granawkins opened 2 years ago

granawkins commented 2 years ago

When there are too many users, users should see a message to that effect, rather than an anonymous error.

Karin sent this message during a class: "Unfortunately, the customization part of SIMOC is not working we keep getting error message 500. We can only use the presets today."

granawkins commented 2 years ago

The error turned out to be a typo in the agent_conn file -- see #182.

Nonetheless, it would be good to have more descriptive error messages sent to / displayed by the frontend. Some situations might be:

ezio-melotti commented 2 years ago

The error messages are a bit generic because we want to spare the users from the details, since usually there's not much they can do about it. It would be more useful to set up some notification for us in case of error. I'm sure GCP can do that, but I'm not sure how.

Server overload might be an exception, but we need a way to detect it, since the code has no direct way to know about server load without asking to GCP. We could try to figure it out indirectly though. Do we know where the timeout error happens in case of overload? Is it some place we can catch it and use it to report a better message?