Added Error handleing on the uppdate method in project