support an error state in onDATA