handle errors without erasing form fields