brotskydotcom / susen.go

A simple sudoku game.
GNU General Public License v2.0
0 stars 1 forks source link

Server-side errors shouldn't crash the client experience #33

Closed brotskydotcom closed 8 years ago

brotskydotcom commented 8 years ago

Right now the server just crashes if it encounters a run-time error (such as database failure). This was by design: the idea was to crash the dyno and have another one (or a reboot) take over. But that turns out not to be such a great idea when you have a logic bug producing the server-side error (such as #32), because then the next dyno that takes the same request will also crash, and so on. Plus it's not a great experience for the user. So it would be better if the server would at least return a 500 error before crashing. And maybe recovering rather than crashing would not be the worst idea.