Mercurial > prosody-hg
diff 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 |
| parents | e47e7185b403 |
| children | ba409c67353b |
line wrap: on
line diff
--- a/net/http/errors.lua Wed Dec 09 14:51:40 2020 +0000 +++ b/net/http/errors.lua Fri Dec 11 10:15:30 2020 +0000 @@ -40,6 +40,10 @@ code = 0, type = "modify", condition = "bad-request"; text = "Invalid URL"; }; + ["unable to resolve service"] = { + code = 0, type = "cancel", condition = "remote-server-not-found"; + text = "DNS resolution failed"; + }; -- This doesn't attempt to map every single HTTP code (not all have sane mappings), -- but all the common ones should be covered. XEP-0086 was used as reference for
