When one of the indexing classes generates an empty batch (either because the list of items it's indexing is empty, or because it doesn't need to make any changes to the index), it will submit an empty list to $elasticsearch.bulk(body: batch). This causes a Elasticsearch::Transport::Transport::Errors::BadRequest error.
Because this error only occurs when the indexing classes are trying to submit zero changes to Elasticsearch, this doesn't affect functionality in any way, but it'd be nice to reduce the number of errors in Resque.
Testing Instructions: I think it would be best to check this in production by waiting a few days and checking whether the error shows up in Resque.
(I think this occurs when deleting bookmarks, because multiple people viewing a page with a deleted bookmark during the same second could cause the IndexSweeper to create two jobs with identical Redis keys. That results in the second job running with an empty batch. But that's probably pretty difficult to replicate on demand, so I think it's better to check production, where it happens on average 10+ times per day.)
We cleared out all Resque failures on 2021-01-16 and waited a week. No such indexing errors reappeared so far. Looks good.