diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-12-11 10:15:30 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-12-11 10:15:30 +0000 |
commit | 8f2e87f1426edec771e3d0c20c5339fd82710f40 (patch) | |
tree | 5dfeb1df41f2aba1b72852207d3fa9e032cc33be /net/http | |
parent | da31a108578f73d7442989c80f66cfea6bf29ec0 (diff) | |
download | prosody-8f2e87f1426edec771e3d0c20c5339fd82710f40.tar.gz prosody-8f2e87f1426edec771e3d0c20c5339fd82710f40.zip |
net.http.errors: Add error class for DNS resolution failures (thanks SouL)
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/errors.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/http/errors.lua b/net/http/errors.lua index ae45d5a8..1691e426 100644 --- a/net/http/errors.lua +++ b/net/http/errors.lua @@ -40,6 +40,10 @@ local error_templates = { 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 |