You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I'm using this library for the stream part. I've followed your tutorial in the docs, having a code pretty close to the guideline
export const initTwitter = async (client) => {
const twitter = client.twitter; //note: twitter = new TwitterApi(BEARER_TOKEN).v2
const stream = await twitter.searchStream({ expansions: "author_id" });
// Awaits for a tweet
stream.on(
// Emitted when Node.js {response} emits a 'error' event (contains its payload).
ETwitterStreamEvent.ConnectionError,
err => console.log('Connection error!', err),
);
stream.on(
// Emitted when Node.js {response} is closed by remote or using .close().
ETwitterStreamEvent.ConnectionClosed,
() => console.log('Connection has been closed.'),
);
stream.on(
// Emitted when a Twitter payload (a tweet or not, given the endpoint).
ETwitterStreamEvent.Data,
(eventData) => tweetHandler(eventData, client),
);
// Enable reconnect feature
stream.autoReconnect = true;
};
But yesterdy I got the following error.
I am pretty confused with what I can do now to mitigate this kind of issue. I thought the .autoReconnect feature would mitigate every issue but apparently it's not the case. Is there a proper way to handle it ?
I thought I have to create a new stream using againt the third line of the upper code, but maybe there's a better way that I did not found already when looking for it in the doc.
Thanks for the help :)
EDIT
I got today also a similar error, but with a more complete log.
Here it is
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys, I'm using this library for the stream part. I've followed your tutorial in the docs, having a code pretty close to the guideline
But yesterdy I got the following error.
I am pretty confused with what I can do now to mitigate this kind of issue. I thought the .autoReconnect feature would mitigate every issue but apparently it's not the case. Is there a proper way to handle it ?
I thought I have to create a new stream using againt the third line of the upper code, but maybe there's a better way that I did not found already when looking for it in the doc.
Thanks for the help :)
EDIT
I got today also a similar error, but with a more complete log.
Here it is
Beta Was this translation helpful? Give feedback.
All reactions