mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #9746 from hillelcoren/v5-develop
Prevent 500 error without logs
This commit is contained in:
commit
eead9094aa
@ -18,6 +18,7 @@ use Illuminate\Auth\Access\AuthorizationException;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundException;
|
||||
use Illuminate\Database\Eloquent\RelationNotFoundException;
|
||||
use Illuminate\Encryption\MissingAppKeyException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\Exceptions\ThrottleRequestsException;
|
||||
use Illuminate\Http\Request;
|
||||
@ -94,11 +95,6 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
if (! Schema::hasTable('accounts')) {
|
||||
info('account table not found');
|
||||
return;
|
||||
}
|
||||
|
||||
if (Ninja::isHosted()) {
|
||||
|
||||
// if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) {
|
||||
@ -154,6 +150,10 @@ class Handler extends ExceptionHandler
|
||||
}
|
||||
|
||||
parent::report($exception);
|
||||
|
||||
if (Ninja::isSelfHost() && $exception instanceof MissingAppKeyException) {
|
||||
info('To setup the app run "cp .env.example .env" followed by "php artisan key:generate"');
|
||||
}
|
||||
}
|
||||
|
||||
private function validException($exception)
|
||||
|
@ -10,11 +10,17 @@
|
||||
</div>
|
||||
|
||||
<div class="col-span-2 h-screen flex">
|
||||
<div class="m-auto md:w-1/2 lg:w-1/4 flex flex-col items-center">
|
||||
<div class="m-auto md:w-1/2 lg:w-1/3 flex flex-col items-center">
|
||||
<span class="flex items-center text-2xl">
|
||||
@yield('code') — @yield('message')
|
||||
</span>
|
||||
|
||||
@if (\App\Utils\Ninja::isSelfHost())
|
||||
<span class="flex items-center text-1xl">
|
||||
Check storage/logs for more details
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<a class="button-link text-sm mt-2" href="{{ url(request()->getSchemeAndHttpHost() . '/client') }}">
|
||||
{{ ctrans('texts.back_to', ['url' => parse_url(request()->getHttpHost())['host'] ?? request()->getHttpHost()]) }}
|
||||
</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user