Software /
code /
prosody
Comparison
net/http/errors.lua @ 11225:8c17c08d100e
net.http.errors: Add error class for DNS resolution failures (thanks SouL)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 11 Dec 2020 10:15:30 +0000 |
parent | 11025:e47e7185b403 |
child | 12974:ba409c67353b |
comparison
equal
deleted
inserted
replaced
11224:8143fd2f138b | 11225:8c17c08d100e |
---|---|
37 text = "Connection failed"; | 37 text = "Connection failed"; |
38 }; | 38 }; |
39 ["invalid-url"] = { | 39 ["invalid-url"] = { |
40 code = 0, type = "modify", condition = "bad-request"; | 40 code = 0, type = "modify", condition = "bad-request"; |
41 text = "Invalid URL"; | 41 text = "Invalid URL"; |
42 }; | |
43 ["unable to resolve service"] = { | |
44 code = 0, type = "cancel", condition = "remote-server-not-found"; | |
45 text = "DNS resolution failed"; | |
42 }; | 46 }; |
43 | 47 |
44 -- This doesn't attempt to map every single HTTP code (not all have sane mappings), | 48 -- This doesn't attempt to map every single HTTP code (not all have sane mappings), |
45 -- but all the common ones should be covered. XEP-0086 was used as reference for | 49 -- but all the common ones should be covered. XEP-0086 was used as reference for |
46 -- most of these. | 50 -- most of these. |