mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Fixed database migration error handling
(Error page was not shown properly)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user