diff --git a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php index 76a4e5d3b8..8620a121b5 100644 --- a/src/Appwrite/Realtime/Message/Handlers/Subscribe.php +++ b/src/Appwrite/Realtime/Message/Handlers/Subscribe.php @@ -57,6 +57,8 @@ class Subscribe extends Action $convertedQueries = Realtime::convertQueries($queries); } catch (QueryException $e) { throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: ' . $e->getMessage()); + } catch (\TypeError $e) { + throw new Exception(Exception::REALTIME_MESSAGE_FORMAT_INVALID, 'Invalid query: query elements must be strings.'); } $convertedChannels = \array_keys(Realtime::convertChannels($payload['channels'], $userId));