mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Python: respond with 500 in case of a coroutine error.
If a coroutine throws an exception, respond with a 500 after logging the exception itself.
This commit is contained in:
parent
2316f1016d
commit
122a86013b
@ -990,6 +990,12 @@ python_coro_run(struct python_coro *coro)
|
||||
Py_XDECREF(traceback);
|
||||
} else {
|
||||
kore_python_log_error("coroutine");
|
||||
|
||||
if (coro->request != NULL) {
|
||||
http_response(coro->request,
|
||||
HTTP_STATUS_INTERNAL_ERROR,
|
||||
NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
coro_running = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user