All jobs / Full-stack developer / Frontend
Full-stack developer interview question · 0–1 years
The API process is down. The UI still loads.
What should the UI do?
The strongest answer
Show a clear outage state with retry, and do not pretend cached or empty data is live — the API being down is a product event
Why it works
Exactly. An outage that looks like 'you have no projects' or 'you were logged out' is a worse bug than a banner.
What a good answer covers
- Down ≠ empty ≠ logged out.
- Name the outage and offer retry.
- Keep the last good data only if you label it stale.
- Never send people to login because the API process died.
Answers that fall short
- Close, but not the strongest: Render an empty list so the page 'works'
Empty is a successful zero. An outage is not a zero. - Weak: Spin forever; they will wait
A forever spinner is how people open five tabs and refresh into a stampede. - Red flag: Redirect to login; 502 looks like a bad session
A 502 is not a 401. Do not burn the session on a dead upstream.
Who gets asked this
More Frontend questions
- 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?
- Two people edit the same note. The second save returns 409 Conflict. What does the UI do with 409?
- 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…