Include port in error messages

pull/1505/head^2
shamoon 1 year ago
parent ef1dfc7323
commit bc981aae3d

@ -57,7 +57,7 @@ export default async function genericProxyHandler(req, res, map) {
}
if (status >= 400) {
logger.debug("HTTP Error %d calling %s//%s%s...", status, url.protocol, url.hostname, url.pathname);
logger.debug("HTTP Error %d calling %s//%s%s%s...", status, url.protocol, url.hostname, url.port, url.pathname);
return res.status(status).json({error: {message: "HTTP Error", url: sanitizeErrorURL(url), resultData}});
}

@ -81,7 +81,7 @@ export async function httpProxy(url, params = {}) {
return [status, contentType, data, responseHeaders];
}
catch (err) {
logger.error("Error calling %s//%s%s...", constructedUrl.protocol, constructedUrl.hostname, constructedUrl.pathname);
logger.error("Error calling %s//%s%s%s...", constructedUrl.protocol, constructedUrl.hostname, constructedUrl.port, constructedUrl.pathname);
logger.error(err);
return [500, "application/json", { error: {message: err?.message ?? "Unknown error", url, rawError: err} }, null];
}

Loading…
Cancel
Save