Check for error before resetting local data.