aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-05 01:34:13 +0100
committerKim Alvefur <zash@zash.se>2019-11-05 01:34:13 +0100
commit028bf41728f26ba7c969395556a6a04c05f5889d (patch)
treea93a788d3b7a0a54b8649c925cc3422446895d8c /net
parent9ea8b29e99e2f8a037dd04384cac0959f47c9c05 (diff)
downloadprosody-028bf41728f26ba7c969395556a6a04c05f5889d.tar.gz
prosody-028bf41728f26ba7c969395556a6a04c05f5889d.zip
net.http.server: Treat promise rejection without value as a HTTP 500 error
Diffstat (limited to 'net')
-rw-r--r--net/http/server.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index dc64728f..47f064a5 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -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