mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
remove the hardcoded throw Timeout Exception;
This commit is contained in:
@@ -179,6 +179,9 @@ App::error()
|
||||
->inject('request')
|
||||
->inject('dbForProject')
|
||||
->action(function (App $utopia, throwable $error, Request $request, Database $dbForProject) {
|
||||
var_dump("App::error");
|
||||
var_dump("getCode=" . $error->getCode());
|
||||
var_dump($error->getMessage());
|
||||
if ($error instanceof Timeout) {
|
||||
var_dump("App::error() in in in in in in in in in in in in in");
|
||||
var_dump($request->getParams());
|
||||
@@ -2102,7 +2105,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
}
|
||||
|
||||
$filterQueries = Query::groupByType($queries)['filters'];
|
||||
$timeoutMilliseconds = 200;
|
||||
$timeoutMilliseconds = 200; // todo: make this configurable
|
||||
|
||||
if ($documentSecurity && !$valid) {
|
||||
$documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, $timeoutMilliseconds);
|
||||
@@ -2112,8 +2115,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
$total = Authorization::skip(fn () => $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $filterQueries, APP_LIMIT_COUNT));
|
||||
}
|
||||
|
||||
throw new Timeout('Timeout'); // Force Exception.....
|
||||
|
||||
/**
|
||||
* Reset $collection attribute to remove prefix.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user