mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
net.http.server: Default to HTTP result code 500 when promise is rejected
This commit is contained in:
parent
04be6c2e83
commit
9229c7a571
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue