Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor(Email): enhance error handling in SMTP and resend methods by passing context to handleError function

Andras Bacsai6eea3c50d882
diff --git a/app/Livewire/Notifications/Email.php b/app/Livewire/Notifications/Email.php
index 3b732af995..c5f518e168 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 b2394d7b07..73e8c73989 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);
}
}