Some small changes

This commit is contained in:
Reinier Criel 2026-01-28 17:25:49 -08:00
parent 7795ed1a03
commit 27d5eff771

View file

@ -14,6 +14,7 @@ let timedoutImdsEndpoints = [];
* @returns {void} * @returns {void}
*/ */
export function tunnelRequest(req, clientSocket, head) { export function tunnelRequest(req, clientSocket, head) {
try {
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy; const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
if (httpsProxy) { if (httpsProxy) {
@ -31,6 +32,11 @@ export function tunnelRequest(req, clientSocket, head) {
} else { } else {
tunnelRequestToDestination(req, clientSocket, head); tunnelRequestToDestination(req, clientSocket, head);
} }
} catch (/** @type {any} */ err) {
ui.writeError(
`Safe-chain: tunnel request failed for ${req.url} : ${err.message}`
);
}
} }
/** /**