From 6eea3c50d88298660987b8f707f04898fb9a848c Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sat, 12 Apr 2025 14:04:34 +0200 Subject: [PATCH] refactor(Email): enhance error handling in SMTP and resend methods by passing context to handleError function --- app/Livewire/Notifications/Email.php | 2 +- app/Livewire/SettingsEmail.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Livewire/Notifications/Email.php b/app/Livewire/Notifications/Email.php index 3b732af99..c5f518e16 100644 --- a/app/Livewire/Notifications/Email.php +++ b/app/Livewire/Notifications/Email.php @@ -269,7 +269,7 @@ class Email extends Component } catch (\Throwable $e) { $this->smtpEnabled = false; - return handleError($e); + return handleError($e, $this); } } diff --git a/app/Livewire/SettingsEmail.php b/app/Livewire/SettingsEmail.php index b2394d7b0..73e8c7398 100644 --- a/app/Livewire/SettingsEmail.php +++ b/app/Livewire/SettingsEmail.php @@ -177,7 +177,7 @@ class SettingsEmail extends Component } catch (\Throwable $e) { $this->smtpEnabled = false; - return handleError($e); + return handleError($e, $this); } } @@ -207,7 +207,7 @@ class SettingsEmail extends Component } catch (\Throwable $e) { $this->resendEnabled = false; - return handleError($e); + return handleError($e, $this); } }