ocaml.org
ocaml.org copied to clipboard
Add an Error Template so that 500 Errors do not render an empty page
Issue https://github.com/ocaml/ocaml.org/issues/1170 has shown when an internal error happens, nothing valuable is shown to the user. A page saying something like: “Sorry, an internal error took place. Not your fault. If you can, please let us know by filing a GitHub issue.”
Dream offers proper support for rendering an Error Template (see https://aantron.github.io/dream/#errors), but we are currently not using this yet.
The task here is to create an error template and to set up an error handler following Dream's documentation.