Throw an error if the data migration fails.