Error recovery
What your UI does after something fails: keep the user's work, say what broke in plain words, offer one obvious way forward.
See it
What it is
Error recovery is everything that happens after the failure: whether the user's typing survives, whether the message says what actually broke, and whether there is one obvious next move. Nielsen's heuristic phrases the job as 'help users recognize, diagnose, and recover from errors', and the recover half is the part most apps skip.
The working shape is: preserve the input (never blank a form on a failed submit), name the problem in the user's vocabulary ('That card was declined by your bank', not 'Error 402'), and offer the action that fixes it (Retry, Use a different card, Contact support with this ID). Distinguish transient failures, where a retry with backoff is the right answer, from terminal ones, where retrying just makes the user angrier. And be careful what you retry on the user's behalf: repeating a read is free, repeating a charge or a submit is a second charge unless the request carries an idempotency key.
Gotcha: a full-page error screen that replaces working UI is a recovery failure disguised as error handling. Scope the failure to the piece that actually broke, keep the rest of the page usable, and include a support reference (request ID, timestamp) so the user has something to hand over when they do get stuck.
Ask AI for it
Add proper error recovery to this flow. On failure: keep every field the user already filled in (never reset the form), scope the error to the region that actually failed rather than replacing the page, and write the message in plain language that names the cause and the fix. Include a primary recovery action (Retry, or an alternative path) and a copyable request ID for support. Retry automatically only for idempotent reads, or writes protected by an idempotency key: honor 'Retry-After' when the server sends it, otherwise use bounded exponential backoff with jitter (3 attempts) while showing a 'Retrying...' status. For every other mutation, offer an explicit Retry action the user presses and leave the form untouched, because silently repeating a purchase or a submission is worse than the original failure. Do not auto-retry 4xx. Keep the rest of the page interactive, and announce the error with role='alert' plus moving focus to it.