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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Fix error message formatting in handleError function
Andras Bacsai01ab8204591a
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.phpindex ed58194943..4a49f34a20 100644--- a/bootstrap/helpers/shared.php+++ b/bootstrap/helpers/shared.php@@ -104,13 +104,13 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = nray($error);if ($error instanceof TooManyRequestsException) {if (isset($livewire)) {- return $livewire->dispatch('error', "Error", "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds.");+ return $livewire->dispatch('error', 'Too many requests. Please try again in {$error->secondsUntilAvailable} seconds.');}return "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds.";}if ($error instanceof UniqueConstraintViolationException) {if (isset($livewire)) {- return $livewire->dispatch('error', "Error", "Duplicate entry found. Please use a different name.");+ return $livewire->dispatch('error', 'Duplicate entry found. Please use a different name.');}return "Duplicate entry found. Please use a different name.";}@@ -125,9 +125,6 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = n}if (isset($livewire)) {- if (str($message)->length() > 20) {- return $livewire->dispatch('error', 'Error', $message);- }return $livewire->dispatch('error', $message);}throw new Exception($message);