Fix condition of errorCode in batchHandler.