# HG changeset patch # User Matthew Wild # Date 1607681730 0 # Node ID 8c17c08d100eaaa27f65a734f14619ec8a74b7d1 # Parent 8143fd2f138b46d75fbc7034ce6efebbe3645a5a net.http.errors: Add error class for DNS resolution failures (thanks SouL) diff -r 8143fd2f138b -r 8c17c08d100e net/http/errors.lua --- 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