Changeset

3865:a44e20cbd986

mod_rest: Special case handling of internal http request errors These include connection errors and certificate problems
author Kim Alvefur <zash@zash.se>
date Sat, 25 Jan 2020 20:16:01 +0100
parents 3864:d845475c75f3
children 3866:c0df50ce96f0
files mod_rest/mod_rest.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua	Sat Jan 25 20:12:50 2020 +0100
+++ b/mod_rest/mod_rest.lua	Sat Jan 25 20:16:01 2020 +0100
@@ -275,6 +275,8 @@
 						reply = st.error_reply(stanza, "modify", "bad-request", body);
 					elseif code_hundreds == 500 then
 						reply = st.error_reply(stanza, "cancel", "internal-server-error", body);
+					elseif code == 0 then
+						reply = st.error_reply(stanza, "wait", "recipient-unavailable", body);
 					else
 						reply = st.error_reply(stanza, "cancel", "undefined-condition", body);
 					end