error handling in batcher