What are empty and error states?
An empty stateEmpty stateThe screen a user sees when there is no content yet, like an empty cart or no search results.Open in glossary → is what a screen shows when it has no content to display. An error state is what it shows when it couldn’t get or show the content. Together with the loading stateLoading stateWhat the UI shows while it waits for data or an action to finish, such as a spinner or skeleton.Open in glossary → and the normal data state, they make up the UI statesUI stateHow a component looks and behaves in a given situation: default, hover, pressed, focused, disabled, loading, error.Open in glossary → that every data screen must handle.
The key idea: “empty” and “failed” are different situations and need different messages. “You have no orders” and “We couldn’t load your orders” might both show an empty list, but they mean opposite things to the user.
The six types
Orders
No orders yet
When you order food, you'll find your orders and receipts here.
First use
A brand-new user, nothing created yet.
Create it: Sign up with a fresh test account.
Inbox
All caught up
You've read every message. New ones will appear here.
User cleared
The user finished or deleted everything.
Create it: Delete, archive or complete every item.
Search
No results for "sushi vegan gluten-free"
Check the spelling or remove a filter.
No results
A search or filter matches nothing.
Create it: Search for "zzqx" or combine filters that exclude everything.
Team orders
Only admins can see team orders
Ask an admin of Acme Ltd. to give you access.
No permission
Data exists, but this user may not see it.
Create it: Log in with a lower role, or deny an OS permission.
Orders
You're offline
Check your connection. We'll reload as soon as you're back.
Offline
The device has no connection.
Create it: Airplane mode, Wi-Fi off, or a proxy that blocks requests.
Orders
We couldn't load your orders
This is on our side. Please try again in a moment.
Error
The server or the app failed.
Create it: Map local / breakpoint a 500, a timeout or broken JSON.
Loading vs empty vs error
A screen that loads data goes through a few states. It should show exactly one at a time:
| State | What it means | What the user should see |
|---|---|---|
| Loading | Request on its way | SkeletonSkeleton screenA grey placeholder layout shaped like the real content, shown while data loads.Open in glossary → or spinner, ideally in the same layout as the content |
| Data | Request OK, items returned | The content |
| Empty | Request OK, zero items | An empty state with a next step |
| Error | Request failed (offline, timeout, 500, 403) | An error state with a way to recover |
Most bugs on these screens are mix-ups between these four: an empty list treated as “still loading” (endless spinner), an error treated as “empty” (the user thinks their data is gone), or “empty” shown for a moment before the data arrives.
Anatomy of a good one
A good empty or error state answers three questions: what happened, why, and what can I do now?
- 1
Illustration or icon
Sets the tone at a glance (offline, nothing here yet, locked). Decorative, so screen readers skip it.
- 2
Headline: what happened
Plain words, no codes: "We couldn't load your orders", not "Error 503".
- 3
Body: why, and what next
One or two sentences. Says whose problem it is (yours or ours) and what the user can do. No blame, no jargon.
- 4
Primary action
The one thing that fixes it: Retry, Browse restaurants, Clear filters. It must actually work.
- 5
Secondary action (optional)
A way out when the main fix fails: Contact support, Go to Home, Switch account.
- 6
Surrounding UI stays usable
The navigation and header still work, so the user is never trapped on the error.
Designs & variants
Full-screen vs inline
Not every problem deserves a whole screen. Match the size of the message to the size of the problem.
Inline: only one part failed
Sakura Sushi Bar
On the way · arrives 19:35
The order still shows. Only the failed section has a small message and its own Retry.
Full-screen error for a small failure
Something went wrong
Please try again later.
The order tracking worked, but one failed widget wiped out the whole screen.
Use a full-screen state when the screen’s main content is missing (the whole list failed, no permission, offline with no cachedCacheStored copies of data or files that make apps and websites load faster.Open in glossary → data). Use inline messages for one section, one card or one form field, and a banner for ongoing conditions like “You’re offline” while cached content stays visible.
Wording: say it like a human
The words matter as much as the picture. A good error messageError messageText that tells the user something went wrong and, ideally, how to fix it.Open in glossary → is specific, calm and useful:
Plain, specific, actionable
We couldn’t load your orders This is a problem on our side, not yours. Please try again in a moment. [Try again]
Codes, blame or dead ends
Error 500
TypeError: Cannot read properties of undefined (reading 'map')
Invalid request. You did something wrong.
Rules to test against:
- No raw codes or stack tracesStack traceThe list of function calls printed when an error happens, showing where in the code it occurred.Open in glossary →. “500”, “-1009” or “TypeError” mean nothing to users and can leak technical details to attackers. A short reference ID for support (“Ref: 8F3K”) is fine.
- No blame. “Invalid input” or “You did something wrong” for a server problem is both rude and false.
- Say whose problem it is. “Check your connection” (user can fix it) vs “This is on our side” (user should wait).
- Always a next step. Retry, Clear filters, Go to Home, Contact support. Never a dead end.
- Don’t lie. An error shown as “No orders yet” makes users think their data is gone.
Skeletons vs spinners
While data loads, a skeleton (grey shapes in the layout of the real content) feels faster and avoids layout jumps. A spinner is fine for short waits or small areas. Either way, test that the loading state ends: with data, with an empty state, or with an error. A loader that can spin forever is a bug.
Loading (skeleton)
Loaded
- Sakura Sushi Bar2 items · €24.80 · Today, 19:05On the way
- Napoli Pizza Corner3 items · €31.50 · Sat, 20:12Delivered
- Green Bowl1 item · €11.90 · Thu, 12:40Delivered
Try it: state explorer
Here’s one Orders screen in seven states. Switch between them and compare the bad version (things testers report every week) with the good one. In the good version, Retry and Show all orders really work.
Screen state
How testers create it: Sign up with a fresh account that has never ordered.
Bad
Orders
No data
- "No data" is technical and cold
- No explanation and no next step
- Looks like an error
Good
Orders
No orders yet
When you order food, you'll find your orders and receipts here.
- Says what will appear here
- One clear action: Browse restaurants
- Friendly, not alarming
Check this part
The API returns 200 with an empty list, but the Orders screen keeps spinning. What is wrong?
Which error message is best?
For a loading list, what is usually better than a blank screen?