-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
TwitterApi.tweets().searchStream().execute() throws 400 error with no response body if additional parameters are included
Expected behavior
defining the call as
Integer backfillMinutes = 1;
OffsetDateTime startTime = OffsetDateTime.parse("2022-10-01T18:40:40.000Z"); // OffsetDateTime | YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Tweets will be provided.
OffsetDateTime endTime = OffsetDateTime.parse("2022-10-14T18:40:40.000Z"); // OffsetDateTime | YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Tweets will be provided.
Set<String> tweetFields = new HashSet<>(Arrays.asList("conversation_id", "author_id")); // Set<String> | A comma separated list of Tweet fields to display.
apiInstance.tweets().searchStream()
.tweetFields(tweetFields)
.backfillMinutes()
.startTime(startTime)
.endTime(endTime)
.execute();
enables the additional functionality of those fields within the searchStream.
Actual behavior
when .execute() is called, a 400 APIException is thrown with a null message body
Steps to reproduce the behavior
As per the code above will reproduce this error.
It is also discovered that .tweetFields() does not trigger this error, as does excluding all optional fields.
Metadata
Metadata
Assignees
Labels
No labels