Changed api.update to better catch DuplicateDataError