If a python handler failed, don't fatal on purpose.

Instead log and send an internal error status back to the client.

This should be OK as long as the exception doesn't happen after
the caller called req.response() already.
This commit is contained in:
Joris Vink 2018-04-11 13:00:30 +02:00
parent ab956fc97a
commit 4ab028633a
1 changed files with 2 additions and 1 deletions

View File

@ -313,7 +313,8 @@ python_runtime_http_request(void *addr, struct http_request *req)
if (pyret == NULL) {
python_log_error("python_runtime_http_request");
fatal("failed to execute python call");
http_response(req, HTTP_STATUS_INTERNAL_ERROR, NULL, 0);
return (KORE_RESULT_OK);
}
if (PyCoro_CheckExact(pyret)) {