From cafe7928796102b024c74451ab20e408b6a0bdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 6 Sep 2023 09:34:02 +0200 Subject: [PATCH] Fix API returning html --- app/controllers/general.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/general.php b/app/controllers/general.php index 01f88b7b67..5c1a23d4a9 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -158,6 +158,7 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques return true; } elseif ($type === 'api') { + $utopia->getRoute()?->label('error', ''); return false; } else { throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, 'Unknown resource type ' . $type);