Form submission retries on network failure
Why it matters
A form that clears its fields on network failure destroys user work and guarantees the user abandons the operation — or at minimum re-enters all data under frustration. ISO 25010 reliability.recoverability requires the application to preserve state across failure events. For signup, checkout, and contact forms this is a direct conversion killer: a single network timeout during form submission can permanently lose a customer. The fix is architectural, not cosmetic: form state must live in React state or a form library, never be cleared in the catch block.
Severity rationale
Low severity at the technical level, but high business impact — form abandonment after submission failure is a direct revenue loss vector for signup and checkout flows.
Remediation
Never clear form state in error handlers. Keep field values in state, show an inline error, and expose a retry action that resubmits the preserved data.
// components/contact-form.tsx
const [fields, setFields] = useState({ email: '', message: '' })
const [status, setStatus] = useState<'idle' | 'submitting' | 'error' | 'success'>('idle')
async function handleSubmit(e: React.FormEvent) {
e.preventDefault()
setStatus('submitting')
try {
await submitContact(fields)
setStatus('success')
} catch {
setStatus('error') // fields unchanged — user can retry
}
}
// In the render:
{status === 'error' && (
<p>
Submission failed. <button onClick={handleSubmit}>Try again</button>
</p>
)}
For long forms, consider persisting draft state to localStorage so data survives a hard refresh.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Error Resilience Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability.recoverability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from error-resilience·automated