HUE-1933 [beeswax] Do not fetch query handle for bad queries