mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-04 13:46:13 +08:00 
			
		
		
		
	Fix: Fix incorrect error handling
This commit is contained in:
		@@ -97,8 +97,7 @@ exports.checkCertificate = function (res) {
 | 
			
		||||
    } = res.request.res.socket.getPeerCertificate(false);
 | 
			
		||||
 | 
			
		||||
    if (!valid_from || !valid_to || !subjectaltname) {
 | 
			
		||||
        reject(new Error('No certificate'));
 | 
			
		||||
        return;
 | 
			
		||||
        throw { message: 'No TLS certificate in response' };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const valid = res.request.res.socket.authorized || false;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user