Changeset

10396:3278f2a31a0a

net.http.server: Treat promise rejection without value as a HTTP 500 error
author Kim Alvefur <zash@zash.se>
date Tue, 05 Nov 2019 01:34:13 +0100
parents 10395:faa4fcc78b14
children 10397:921e8b00778e
files net/http/server.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/server.lua	Fri Nov 01 22:31:15 2019 +0100
+++ b/net/http/server.lua	Tue Nov 05 01:34:13 2019 +0100
@@ -196,7 +196,7 @@
 		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