PR review changes

This commit is contained in:
Matej Bačo 2024-01-25 14:56:15 +00:00
parent f4a4cfa207
commit 50c2ebc950

View file

@ -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;
}
}
/**