All jobs / Full-stack developer / Frontend
Full-stack developer interview question · 1–3 years
Two people edit the same note. The second save returns 409 Conflict.
What does the UI do with 409?
The strongest answer
Show their version and the server version, and ask which wins — do not silently overwrite and do not retry the same body
Why it works
Exactly. 409 means two writers. The product decision is merge or pick — not a tighter loop.
What a good answer covers
- 409 is a conversation, not a retry.
- Show both copies or a merge.
- Send an ETag / version on the next attempt.
- Do not discard in-progress edits.
Answers that fall short
- Close, but not the strongest: Retry the PUT until 200
Retrying the same write is how you clobber the other person on purpose. - Weak: Ignore 409; keep the local form as source of truth
Local-as-truth after a 409 is a lost-update with extra confidence. - Red flag: Reload the page without a word
A silent reload throws away the words they were still editing.
Who gets asked this
More Frontend questions
- A teammate throws inside `fetch` so the React error boundary can show the outage. What is the difference?
- A burst of autosaves returns 429 from the API gateway. What does the UI do with 429?
- The first screen is a list loaded from `GET /items`. What states does the screen need?
- Saving a profile can fail with a 400 (`email taken`) or a 500. What does the UI show?
- The user submits 'create project'. A teammate wants the new card to appear before the response. When do you…
- The API process is down. The UI still loads. What should the UI do?
- A Next-style SSR page flashes and React logs a hydration mismatch on the header. What do you fix first?
- A long profile form is open. The user hits Save and the network is slow. What does the form do?