Sub topic 9
Error Paths, Edge Cases, and Dead Ends
Assume you already understand user goals, basic interface screens, and the difference between a user flow and a task flow. This chapter focuses on what happens when the expected path breaks. A useful flow shows recovery, not only success.
Error paths
An error path describes what happens when a user cannot continue as expected. The cause might be invalid input, a failed network request, missing permission, or an unavailable service.
For each error, define four things:
- Trigger: What causes the problem?
- Feedback: What does the user learn?
- Recovery: What action can the user take?
- Destination: Where does the flow continue?
For example, a sign-in flow might include this path:
- The user submits an incorrect password.
- The interface explains that the email or password is incorrect.
- The user corrects the credentials or chooses “Forgot password.”
- The flow returns to the sign-in form or moves to password recovery.
An error message without a recovery action creates friction. “Something went wrong” does not tell users what to do next.
Edge cases and dead ends
An edge case is a less common condition that still needs a defined response. Examples include an expired reset link, a full storage quota, a duplicate account, or a user who lacks permission to complete an action.
A dead end is a flow state with no useful next step. A dead end may be intentional, such as a confirmation screen that ends a task. It is a design failure when the user reaches it because the team forgot to define what happens next.
Use distinct notation for these situations:
- Connect an error branch back to the step the user can retry.
- Connect a recovery branch to an alternative task, such as contacting support.
- Mark a true endpoint clearly.
- Add a fallback when a service failure prevents completion.
| Situation | Weak outcome | Better flow response |
|---|---|---|
| Expired reset link | “Invalid link” | Explain expiration and offer a new link |
| Network failure | Blank screen | Preserve entered data and offer retry |
| No permission | Hidden action | Explain the restriction and identify the owner |
| Duplicate submission | Two records created | Disable repeated submission and confirm the result |
Mapping recovery branches
The following flow shows how a password reset handles an expired link and a password that fails validation.
A branch should answer the user’s next question. If a link expires, the user needs a way to request another one. If a password fails a rule, the interface should identify the unmet rule near the password field.
Checking a flow for dead ends
You can represent a flow as a map. Each key names a step, and its array lists possible next steps. The validator below reports steps that have no next step unless they are declared endpoints.
const flow = {
request_reset: ["open_link"],
open_link: ["link_valid"],
link_valid: ["new_password", "expired_link"],
expired_link: ["request_reset"],
new_password: ["password_valid"],
password_valid: ["updated", "password_error"],
password_error: ["new_password"],
updated: [],
};
const endpoints = new Set(["updated"]);
const deadEnds = Object.entries(flow)
.filter(([step, next]) => next.length === 0 && !endpoints.has(step))
.map(([step]) => step);
console.log(deadEnds); // []This check catches missing transitions, but it cannot judge whether the wording is clear or whether recovery is usable. Pair automated checks with a walkthrough.
Review questions
Walk through every branch as a user who has a specific problem:
- Can the user understand what happened?
- Is the next action visible?
- Does retrying preserve useful input?
- Can the user leave and return without losing progress?
- Does every nonterminal step eventually reach a valid endpoint?
- Does the flow account for permissions, unavailable services, and repeated actions?
Exercise
A checkout flow shows “Payment failed” and leaves the user on the payment screen with an empty form. What two changes should the flow specify?
Show answer
It should explain the likely cause or next action, and it should preserve or safely restore the entered payment details so the user can retry or choose another payment method.