mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Handle missing resource token collection (#12625)
This commit is contained in:
1 parent
fde5d022dd
commit
0cf4722597
1 file changed
+5
-1
@@ -1108,7 +1108,11 @@ return function (Container $context): void {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
$token = $authorization->skip(fn () => $dbForProject->getDocument('resourceTokens', $tokenId));
|
||||
try {
|
||||
$token = $authorization->skip(fn () => $dbForProject->getDocument('resourceTokens', $tokenId));
|
||||
} catch (\Utopia\Database\Exception\NotFound) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
if ($token->isEmpty()) {
|
||||
return new Document([]);
|
||||
|
||||
Reference in new issue
Block a user