An app should handle failure by rolling back or correcting the optimistic UI and giving appropriate user feedback.