Fixed 404 error handling

This commit is contained in:
Bernd Bestel 2026-06-16 20:24:26 +02:00
parent c0a9d615fa
commit d565abc3aa
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -25,6 +25,11 @@ class ExceptionController extends BaseApiController
public function __invoke(ServerRequestInterface $request, Throwable $exception, bool $displayErrorDetails, bool $logErrors, bool $logErrorDetails, ?LoggerInterface $logger = null)
{
if (!defined('GROCY_LOCALE'))
{
define('GROCY_LOCALE', GROCY_DEFAULT_LOCALE);
}
$response = $this->ResponseFactory->createResponse();
$isApiRoute = string_starts_with($request->getUri()->getPath(), '/api/');