mirror of
https://github.com/grocy/grocy.git
synced 2025-04-28 17:23:56 +00:00
Fixed database migration error handling
(Error page was not shown properly)
This commit is contained in:
parent
6ec3743d12
commit
b2f555400c
@ -25,9 +25,13 @@ class ExceptionController extends BaseApiController
|
||||
public function __invoke(ServerRequestInterface $request, Throwable $exception, bool $displayErrorDetails, bool $logErrors, bool $logErrorDetails, ?LoggerInterface $logger = null)
|
||||
{
|
||||
$response = $this->app->getResponseFactory()->createResponse();
|
||||
|
||||
$isApiRoute = string_starts_with($request->getUri()->getPath(), '/api/');
|
||||
|
||||
if (!defined('GROCY_AUTHENTICATED'))
|
||||
{
|
||||
define('GROCY_AUTHENTICATED', false);
|
||||
}
|
||||
|
||||
if ($isApiRoute)
|
||||
{
|
||||
$status = 500;
|
||||
|
Loading…
x
Reference in New Issue
Block a user