Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error: https://react-tweet.vercel.app/api/tweet/{tweet_id} #151

Open
takabinance opened this issue Dec 16, 2023 · 2 comments
Open

404 error: https://react-tweet.vercel.app/api/tweet/{tweet_id} #151

takabinance opened this issue Dec 16, 2023 · 2 comments
Assignees

Comments

@takabinance
Copy link

Today the api stopped working for me. It had been working for days.

Funny enough, the demo id (https://react-tweet.vercel.app/api/tweet/1629307668568633344) still returns data but maybe cached somewhere?

e.g.,
Request URL: https://react-tweet.vercel.app/api/tweet/1736135372386484521
Request Method: GET
Status Code: 404 Not Found
Remote Address: 76.76.21.98:443
Referrer Policy: strict-origin-when-cross-origin

@takabinance
Copy link
Author

And now it works. Sigh. Just to set expectations, is there any sense for how often this happens (trying to figure out if I need to create some sort of backup strategy if this happens again).

@lfades
Copy link
Member

lfades commented Dec 17, 2023

The reason this is likely happening is Vercel being rate limited by Twitter. It's intended for the Twitter API we use to work in most scenarios but because Vercel's IPs are making a considerable amount of requests in the server they're being rate limited.

The solution I'm thinking right now is to implement caching and to fallback to client-side data fetching if necessary. Caching will work very well if enabled during development as those requests will come from your machine.

@lfades lfades self-assigned this Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants