Added error handling for edit/update actions on ids that don't exist.