From 50c2ebc950eeca5ccd54df52fa1cd7afa6dae823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 25 Jan 2024 14:56:15 +0000 Subject: [PATCH] PR review changes --- src/Appwrite/Platform/Workers/Certificates.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Certificates.php b/src/Appwrite/Platform/Workers/Certificates.php index cb0f01dbd8..75912c32ef 100644 --- a/src/Appwrite/Platform/Workers/Certificates.php +++ b/src/Appwrite/Platform/Workers/Certificates.php @@ -169,7 +169,6 @@ class Certificates extends Action $success = true; } catch (Throwable $e) { $logs = $e->getMessage(); - $finalException = $e; // Set exception as log in certificate document $certificate->setAttribute('logs', \mb_strcut($logs, 0, 1000000));// Limit to 1MB @@ -183,6 +182,8 @@ class Certificates extends Action // Send email to security email $this->notifyError($domain->get(), $e->getMessage(), $attempts, $queueForMails); + + throw $e; } finally { // All actions result in new updatedAt date $certificate->setAttribute('updated', DateTime::now()); @@ -190,10 +191,6 @@ class Certificates extends Action // Save all changes we made to certificate document into database $this->saveCertificateDocument($domain->get(), $certificate, $success, $dbForConsole, $queueForEvents, $queueForFunctions); } - - if (isset($finalException)) { - throw $finalException; - } } /**