Handle persistence errors in the returned json and error code for bulk actions