From 8aabb92fdaccec0bd7964e9e7d3b95d13a82ac8e Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 19 May 2024 13:50:25 +0300 Subject: [PATCH] adding requests count on error --- app/controllers/shared/api.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index d1073ee8e7..91e7f87113 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -27,6 +27,7 @@ use Utopia\Database\Document; use Utopia\Database\Helpers\Role; use Utopia\Database\Validator\Authorization; use Utopia\Logger\Log\User; +use Utopia\Logger\Logger; use Utopia\System\System; use Utopia\Validator\WhiteList; @@ -755,6 +756,10 @@ App::error() $publish = $error->getCode() === 0 || $error->getCode() >= 500; } + if ($error->getCode() >= 400 && $error->getCode() < 500) { + $publish = true; + } + if ($publish && $project->getId() !== 'console') { if (!Auth::isPrivilegedUser(Authorization::getRoles())) { $fileSize = 0;