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

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-08-23 17:29:43 +02:00 committed by GitHub
parent 2f81652400
commit a01c3fbc19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}
}