api res.json error in batch