Lesson 12 of 30
'Error 422' is technically accurate and completely useless to the person reading it. A good error message answers two questions a status code never does: what actually went wrong, and what do I do now.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A form submission fails and shows "Error 422. Please correct the errors and try again," with no indication of which of the form's 10 fields is the problem. What's the core issue with this message?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
An error message can be technically accurate and still fail its actual job. "Error 422," "Something went wrong," and "Request failed" are all true — and none of them tell the user what happened in terms they can act on. A useful error message states what went wrong in plain, user-facing language and, wherever possible, what to do next. "This email is already registered — try signing in instead" does the same job "Error 422" does for the system, but it's the version a human can actually use.
Errors also need to be shown at the right level, and the three levels aren't interchangeable:
Compare two versions of the same failed form submission:
"Invalid input. Please correct the errors and try again."
versus
"Password must be at least 8 characters and include a number. Yours is 6 characters with no number."
The first is technically true and requires the user to hunt across the entire form for which field, of possibly a dozen, is the actual problem. The second names the specific field, states the specific rule that wasn't met, and states specifically how the given input failed to meet it — the user can fix it without a second guess.
The most damaging pattern is an error that implicitly blames the user without saying which field or why — "Something's wrong with your submission" reads as the product refusing to explain itself. The fix is never a softer tone on the same vague message; it's naming the actual field and the actual rule.
"How would you improve this error message?" tests exactly this distinction — a candidate who rewrites "Error 422" into specific, actionable, correctly-placed text (the right field, the right level, a concrete next step) is demonstrating the difference between engineering-accurate and user-useful, which is a genuinely common gap in real products.