mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Catch query parse exceptions
This commit is contained in:
parent
425dd9639c
commit
ca877fa71d
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue