net.http.server: Treat promise rejection without value as a HTTP 500 error

This commit is contained in:
Kim Alvefur 2019-11-05 01:34:13 +01:00
parent 5cac177270
commit 58990598f2

View file

@ -196,7 +196,7 @@ local function handle_result(request, response, result)
result:next(function (ret)
handle_result(request, response, ret);
end, function (err)
handle_result(request, response, err);
handle_result(request, response, err or 500);
end);
return true;
elseif result_type == "table" then