From ca877fa71de4bd3601d23986a64a9420ec87137c Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 29 Dec 2025 13:24:24 +0000 Subject: [PATCH] Catch query parse exceptions --- .../Platform/Modules/Storage/Http/Buckets/Files/XList.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/XList.php b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/XList.php index f9448f7d87..e46fdb2a0a 100644 --- a/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/XList.php +++ b/src/Appwrite/Platform/Modules/Storage/Http/Buckets/Files/XList.php @@ -89,7 +89,11 @@ class XList extends Action throw new Exception(Exception::USER_UNAUTHORIZED); } - $queries = Query::parseQueries($queries); + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } if (!empty($search)) { $queries[] = Query::search('search', $search);