handle error in addEditPhoto