Open
Description
We recently introduced a feature to allow clients to mark a build as bad which results in auto reset of all such workflows and stops dispatching task to worker with bad build. This results in PollForDecisionTask to fail with BadRequestError running that build. Returning this error results in a tight loop on worker which hits the server with repeated PollForDecisionTask calls from that worker. This behavior eats up most of the API quota for that domain and results in aggressive throttling for the domain.
We need to prevent this aggressive spin of PollForDecisionTask if it fails with BadRequestError.