Restructure batch errors creation