mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +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)
|
public function __invoke(ServerRequestInterface $request, Throwable $exception, bool $displayErrorDetails, bool $logErrors, bool $logErrorDetails, ?LoggerInterface $logger = null)
|
||||||
{
|
{
|
||||||
$response = $this->app->getResponseFactory()->createResponse();
|
$response = $this->app->getResponseFactory()->createResponse();
|
||||||
|
|
||||||
$isApiRoute = string_starts_with($request->getUri()->getPath(), '/api/');
|
$isApiRoute = string_starts_with($request->getUri()->getPath(), '/api/');
|
||||||
|
|
||||||
|
if (!defined('GROCY_AUTHENTICATED'))
|
||||||
|
{
|
||||||
|
define('GROCY_AUTHENTICATED', false);
|
||||||
|
}
|
||||||
|
|
||||||
if ($isApiRoute)
|
if ($isApiRoute)
|
||||||
{
|
{
|
||||||
$status = 500;
|
$status = 500;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user