[SERVER] Catch any error and return a 500 response instead of crashing.

The server will be running some code on the behalf of the calling code.
We really don't what to crash the library (and the binary) because
of a wrong request.
This commit is contained in:
Matthieu Gautier
2019-08-11 11:27:54 +02:00
parent de819dff25
commit 7060afae66
4 changed files with 64 additions and 16 deletions

16
static/templates/500.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="content-type" />
<title>Internal Server Error</title>
</head>
<body>
<h1>Internal Server Error</h1>
<p>
An internal server error occured. We are sorry about that :/
</p>
<p>
{{ error }}
</p>
</body>
</html>