aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-12-11 10:15:30 +0000
committerMatthew Wild <mwild1@gmail.com>2020-12-11 10:15:30 +0000
commit8678cc2915c33c5fa426ed8157e76924748b08e4 (patch)
tree5dfeb1df41f2aba1b72852207d3fa9e032cc33be /net/http
parent9d303c4eed7030aa2faaded7ae5ee81146dfc47e (diff)
downloadprosody-8678cc2915c33c5fa426ed8157e76924748b08e4.tar.gz
prosody-8678cc2915c33c5fa426ed8157e76924748b08e4.zip
net.http.errors: Add error class for DNS resolution failures (thanks SouL)
Diffstat (limited to 'net/http')
-rw-r--r--net/http/errors.lua4
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