remove unnecessary try/catch

This commit is contained in:
Alex Holliday committed 2025-01-19 09:56:28 -08:00
1 parent da89789a97
commit 0aaeeef113
1 file changed
-4
-4
View File
@@ -13,7 +13,6 @@ const handleError = (error, serviceName, method, status = 500) => {
};
const fetchMonitorCertificate = async (sslChecker, monitor) => {
try {
const monitorUrl = new URL(monitor.url);
const hostname = monitorUrl.hostname;
const cert = await sslChecker(hostname);
@@ -22,9 +21,6 @@ const fetchMonitorCertificate = async (sslChecker, monitor) => {
throw new Error("Certificate not found");
}
return cert;
} catch (error) {
throw error;
}
};
export { handleValidationError, handleError, fetchMonitorCertificate };