aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-08-25 15:57:39 +0100
committerMatthew Wild <mwild1@gmail.com>2020-08-25 15:57:39 +0100
commit209660f21244ee06b5bfcd8f5addc830058d3104 (patch)
treeaa58ba4340887e644d8f101278d404118792d6c8 /net
parentf25f4bb11a7e68ec997d360c71195e2941042f2a (diff)
downloadprosody-209660f21244ee06b5bfcd8f5addc830058d3104.tar.gz
prosody-209660f21244ee06b5bfcd8f5addc830058d3104.zip
net.http: use new net.http.errors lib for creating error object
Diffstat (limited to 'net')
-rw-r--r--net/http.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/http.lua b/net/http.lua
index f1055840..2deeae14 100644
--- a/net/http.lua
+++ b/net/http.lua
@@ -13,7 +13,7 @@ local util_http = require "util.http";
local events = require "util.events";
local verify_identity = require"util.x509".verify_identity;
local promise = require "util.promise";
-local errors = require "util.error";
+local http_errors = require "net.http.errors";
local basic_resolver = require "net.resolvers.basic";
local connect = require "net.connect".connect;
@@ -291,7 +291,7 @@ local function new(options)
return promise.new(function (resolve, reject)
request(self, u, ex, function (body, code, a, b)
if code == 0 then
- reject(errors.new(body, { request = a }));
+ reject(http_errors.new(body, { request = a }));
else
resolve({ request = b, response = a });
end