-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Hello,
I'm trying to use the channel.search method and I keep receiving this error:
Error: StreamChat error code 4: Search failed with error: "There are no searchable channels"
at StreamChat.errorFromResponse (/Users/renan/projetos/backend-monorepo/node_modules/stream-chat/src/client.ts:1104:13)
at StreamChat.errorFromResponse [as handleResponse] (/Users/renan/projetos/backend-monorepo/node_modules/stream-chat/src/client.ts:1115:18)
at handleResponse (/Users/renan/projetos/backend-monorepo/node_modules/stream-chat/src/client.ts:1053:21)
at /Users/renan/projetos/backend-monorepo/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:52:18
at Generator.<anonymous> (/Users/renan/projetos/backend-monorepo/node_modules/@babel/runtime/helpers/regenerator.js:52:51)
at Generator.throw (/Users/renan/projetos/backend-monorepo/node_modules/@babel/runtime/helpers/regeneratorDefine.js:11:21)
at asyncGeneratorStep (/Users/renan/projetos/backend-monorepo/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _throw (/Users/renan/projetos/backend-monorepo/node_modules/@babel/runtime/helpers/asyncToGenerator.js:20:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
The code i'm using:
const serverClient = StreamChat.getInstance(apiKey, apiSecret, {
logger: (logLevel: LogLevel, message: string, _extraData?: Record<string, unknown>) => {
switch (logLevel) {
case 'info':
return logger.info(message);
case 'warn':
return logger.warn(message);
case 'error':
return logger.error(message);
}
},
});
const channel = serverClient.channel('livestream', '14da57cf-6751-4ba3-ab15-23848c3a5136', {});
console.log(channel);
const response = await channel.search({
text: 'ASK_CREATED',
});
console.log(response);
Metadata
Metadata
Assignees
Labels
No labels