Kapacitor script fails to execute fully if measurement doesn't exist - Alert trigger desired

I have a simple Kapacitor script that does a batch|query() with a count() of datapoints and does it’s alerting based off of this count value.

The script works as long as the measurement exists in Influx (because at least one previous datapoint has been inserted).

HOWEVER, if the the measurement does not (yet) exist in Influx, the intended / expected behavior is that the query would return a count value = 0, and an alert could be triggered off of this. Instead, it appears that nodes following the query() node are not executed (e.g.,|log() and most importantly |alert() do not run).

Seems like an edge case where you might be testing for ‘No Data’, but assumes some pre-existing data (say, prior to time window being presently queried) is/was available. Perhaps I’m missing something, but seems that this behavior is not ideal.

Bug? Workaround? Am I thinking about this wrong?