1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Merge pull request #7539 from appwrite/fix-client-error-reporting

Fix: client error reporting
This commit is contained in:
Eldad A. Fux 2024-02-02 15:12:24 +01:00 committed by GitHub
commit 6fe725ff9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -607,10 +607,11 @@ App::error()
->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log) {
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->getRoute();
$publish = true;
if ($error instanceof AppwriteException) {
$publish = $error->isPublishable();
} else {
$publish = $error->getCode() === 0 || $error->getCode() >= 500;
}
if ($logger && ($publish || $error->getCode() === 0)) {