PLhery / node-twitter-api-v2

Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
https://www.npmjs.com/package/twitter-api-v2
Apache License 2.0
1.29k stars 176 forks source link

Request failed Error #406

Open bigansh opened 1 year ago

bigansh commented 1 year ago

So I was migrating my DB, and I needed to get the data of the individual tweet. It worked for a while & then I received an error that doesn't say anything about it. Here is the screenshot of the error.

image

This is the code.

const tweet = await twitterClient.v2.singleTweet(
                    bookmark.twitter_status_id
                )

                bookmark.post_heading = tweet?.data?.text
                bookmark.post_data = tweet?.data?.text
alkihis commented 1 year ago

A request error is mostly a network problem. You can get the inner Node.js error my accessing error.requestError.stack (error being the catched error)