helper/schema: return the prior state if Data is an error