mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 06:48:47 +00:00
Fix error port display, again
This commit is contained in:
parent
b960813ed9
commit
1b984abd91
2 changed files with 4 additions and 4 deletions
|
@ -58,11 +58,11 @@ export default async function genericProxyHandler(req, res, map) {
|
||||||
|
|
||||||
if (status >= 400) {
|
if (status >= 400) {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"HTTP Error %d calling %s//%s:%s%s...",
|
"HTTP Error %d calling %s//%s%s%s...",
|
||||||
status,
|
status,
|
||||||
url.protocol,
|
url.protocol,
|
||||||
url.hostname,
|
url.hostname,
|
||||||
url.port,
|
url.port ? `:${url.port}` : '',
|
||||||
url.pathname
|
url.pathname
|
||||||
);
|
);
|
||||||
return res.status(status).json({error: {message: "HTTP Error", url: sanitizeErrorURL(url), resultData}});
|
return res.status(status).json({error: {message: "HTTP Error", url: sanitizeErrorURL(url), resultData}});
|
||||||
|
|
|
@ -82,10 +82,10 @@ export async function httpProxy(url, params = {}) {
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
logger.error(
|
logger.error(
|
||||||
"Error calling %s//%s:%s%s...",
|
"Error calling %s//%s%s%s...",
|
||||||
constructedUrl.protocol,
|
constructedUrl.protocol,
|
||||||
constructedUrl.hostname,
|
constructedUrl.hostname,
|
||||||
constructedUrl.port,
|
constructedUrl.port ? `:${constructedUrl.port}` : '',
|
||||||
constructedUrl.pathname
|
constructedUrl.pathname
|
||||||
);
|
);
|
||||||
logger.error(err);
|
logger.error(err);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue