added type error to the subscribe handler

This commit is contained in:
ArnabChatterjee20k
2026-05-07 12:24:42 +05:30
parent 6679d02a35
commit ce07c6ffd5
@@ -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));