mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-16 19:24:41 -05:00
Fix: Fix incorrect error handling
This commit is contained in:
parent
4d262bbb6a
commit
6b72d5033a
@ -97,8 +97,7 @@ exports.checkCertificate = function (res) {
|
|||||||
} = res.request.res.socket.getPeerCertificate(false);
|
} = res.request.res.socket.getPeerCertificate(false);
|
||||||
|
|
||||||
if (!valid_from || !valid_to || !subjectaltname) {
|
if (!valid_from || !valid_to || !subjectaltname) {
|
||||||
reject(new Error('No certificate'));
|
throw { message: 'No TLS certificate in response' };
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const valid = res.request.res.socket.authorized || false;
|
const valid = res.request.res.socket.authorized || false;
|
||||||
|
Loading…
Reference in New Issue
Block a user