Trying to use a realtime for database channel
TypeScript
useEffect(() => {
const unsubscribe = client.subscribe(
`databases.${MAIN_DATABASE_ID}.collections.${REPORTS_COLLECTION_ID}.documents.${reportInfo.id}.update`,
(response) => {
setReportInfo({
...reportInfo,
active: (response.payload as any).vote_active,
});
},
);
console.log('unsubscribe:', unsubscribe)
return () => {
unsubscribe();
};
}, [reportInfo]);````
but for some reason, it returns 400 bad request
TL;DR
Title: Realtime 400 bad request
Developers are using a realtime database channel but encountering a 400 bad request. The issue may stem from how the client is subscribing to the database channel. Make sure the subscription details are accurate.Recommended threads
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...