diff --git a/dist/index.js b/dist/index.js index 20326841..56268e01 100644 --- a/dist/index.js +++ b/dist/index.js @@ -75468,11 +75468,7 @@ function verifyProxyConnect(req) { req.once("proxyConnect", (response) => { if (response.statusCode !== 200) { const statusText = response.statusText ? ` ${response.statusText}` : ""; - req.destroy( - new Error( - `Proxy CONNECT returned HTTP ${response.statusCode}${statusText}; aborting` - ) - ); + req.destroy(new Error(`Proxy CONNECT returned HTTP ${response.statusCode}${statusText}; aborting`)); } }); } diff --git a/src/helpers.ts b/src/helpers.ts index d99d7a71..2557fb43 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -225,11 +225,7 @@ export function verifyProxyConnect(req: http.ClientRequest): void { req.once('proxyConnect', (response: { statusCode: number; statusText: string }) => { if (response.statusCode !== 200) { const statusText = response.statusText ? ` ${response.statusText}` : ''; - req.destroy( - new Error( - `Proxy CONNECT returned HTTP ${response.statusCode}${statusText}; aborting`, - ), - ); + req.destroy(new Error(`Proxy CONNECT returned HTTP ${response.statusCode}${statusText}; aborting`)); } }); }