net.http.server: Default to HTTP result code 500 when promise is rejected

This commit is contained in:
Matthew Wild 2020-09-28 16:21:41 +01:00
parent 04be6c2e83
commit 9229c7a571

View file

@ -197,6 +197,7 @@ local function handle_result(request, response, result)
result:next(function (ret)
handle_result(request, response, ret);
end, function (err)
response.status_code = 500;
handle_result(request, response, err or 500);
end);
return true;