fix: report livewire errors

This commit is contained in:
Andras Bacsai 2023-09-24 12:10:36 +02:00
parent cdb2a3a8e5
commit ba74d55b4c
4 changed files with 7 additions and 5 deletions

View File

@ -100,7 +100,8 @@ function handleError(?Throwable $error = null, ?Livewire\Component $livewire = n
return "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds."; return "Too many requests. Please try again in {$error->secondsUntilAvailable} seconds.";
} }
if (isset($livewire)) { if (isset($livewire)) {
return $livewire->emit('error', $message); $livewire->emit('error', $message);
throw new RuntimeException($message);
} }
throw new RuntimeException($message); throw new RuntimeException($message);
@ -240,7 +241,8 @@ function base_ip(): string
} }
return "localhost"; return "localhost";
} }
function getOnlyFqdn(String $fqdn) { function getOnlyFqdn(String $fqdn)
{
$url = Url::fromString($fqdn); $url = Url::fromString($fqdn);
$host = $url->getHost(); $host = $url->getHost();
$scheme = $url->getScheme(); $scheme = $url->getScheme();

View File

@ -7,7 +7,7 @@ return [
// The release version of your application // The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.44', 'release' => '4.0.0-beta.45',
// When left empty or `null` the Laravel environment will be used // When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'), 'environment' => config('app.env'),

View File

@ -1,3 +1,3 @@
<?php <?php
return '4.0.0-beta.44'; return '4.0.0-beta.45';

View File

@ -4,7 +4,7 @@
"version": "3.12.36" "version": "3.12.36"
}, },
"v4": { "v4": {
"version": "4.0.0-beta.44" "version": "4.0.0-beta.45"
} }
} }
} }