Mercurial > prosody-modules
comparison mod_rest/mod_rest.lua @ 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 | d845475c75f3 |
| children | c0df50ce96f0 |
comparison
equal
deleted
inserted
replaced
| 3864:d845475c75f3 | 3865:a44e20cbd986 |
|---|---|
| 273 reply = st.error_reply(stanza, errors.new(code, nil, code2err)); | 273 reply = st.error_reply(stanza, errors.new(code, nil, code2err)); |
| 274 elseif code_hundreds == 400 then | 274 elseif code_hundreds == 400 then |
| 275 reply = st.error_reply(stanza, "modify", "bad-request", body); | 275 reply = st.error_reply(stanza, "modify", "bad-request", body); |
| 276 elseif code_hundreds == 500 then | 276 elseif code_hundreds == 500 then |
| 277 reply = st.error_reply(stanza, "cancel", "internal-server-error", body); | 277 reply = st.error_reply(stanza, "cancel", "internal-server-error", body); |
| 278 elseif code == 0 then | |
| 279 reply = st.error_reply(stanza, "wait", "recipient-unavailable", body); | |
| 278 else | 280 else |
| 279 reply = st.error_reply(stanza, "cancel", "undefined-condition", body); | 281 reply = st.error_reply(stanza, "cancel", "undefined-condition", body); |
| 280 end | 282 end |
| 281 end | 283 end |
| 282 | 284 |
