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.

fix(navbar): add error handling for proxy status check to improve user feedback

Andras Bacsai281fd603d416
diff --git a/resources/views/livewire/server/navbar.blade.php b/resources/views/livewire/server/navbar.blade.php
index 1e7ea38315..24e3d44123 100644
--- a/resources/views/livewire/server/navbar.blade.php
+++ b/resources/views/livewire/server/navbar.blade.php
@@ -154,8 +154,13 @@
@script
<script>
$wire.$on('checkProxyEvent', () => {
- $wire.$dispatch('info', 'Checking if the required ports are not used by other services.');
- $wire.$call('checkProxy');
+ try {
+ $wire.$dispatch('info', 'Checking if the required ports are not used by other services.');
+ $wire.$call('checkProxy');
+ } catch (error) {
+ console.error(error);
+ $wire.$dispatch('error', 'Failed to check proxy status. Please try again.');
+ }
});
$wire.$on('restartEvent', () => {
$wire.$dispatch('info', 'Initiating proxy restart.');