fix(core): Throw NodeSSLError only for nodes that allow ignoring SSL issues (#6928)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ authored and GitHub committed 2023-08-23 17:29:43 +02:00
1 parent 2f81652400
commit a01c3fbc19
1 file changed
+1 -1
+1 -1
View File
@@ -720,7 +720,7 @@ export async function proxyRequestToAxios(
error: responseData,
response: pick(response, ['headers', 'status', 'statusText']),
});
} else if (error instanceof Error && error.message.includes('SSL routines')) {
} else if ('rejectUnauthorized' in configObject && error.code?.includes('CERT')) {
throw new NodeSSLError(error);
}
}