-
Notifications
You must be signed in to change notification settings - Fork 46.2k
fix(blocks): clamp Twitter search start_time to 10 seconds before now #11461
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
base: dev
Are you sure you want to change the base?
Conversation
Twitter API requires start_time to be at least 10 seconds prior to the request time. When users provide a future time or a time too close to now, the API returns a 400 error. Changes: - Clamp start_time to max(start_time, now - 10s) in TweetDurationBuilder - Update input description to document this behavior - Fix serialize_list to handle None data gracefully Affected blocks: - TwitterSearchRecentTweetsBlock - TwitterGetUserMentionsBlock - TwitterGetHomeTimelineBlock - TwitterGetUserTweetsBlock Fixes BUILDER-3PG 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for auto-gpt-docs canceled.
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Here's the code health analysis summary for commits Analysis Summary
|
Abhi1992002
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary
start_timeto at least 10 seconds before request time (Twitter API requirement)serialize_listto handleNonedata gracefully (exposed by the fix)Background
Twitter API returns
400 Bad Requestwhenstart_timeis less than 10 seconds before the request time. Users providing current/future times would hit this error.Sentry Issue: BUILDER-3PG
Affected Blocks
TwitterSearchRecentTweetsBlockTwitterGetUserMentionsBlockTwitterGetHomeTimelineBlockTwitterGetUserTweetsBlockTest plan
TwitterSearchRecentTweetsBlockwith current time asstart_time🤖 Generated with Claude Code