add error partial and modify controller