App Investigators scanner online

← All guides

Show a message for empty search results and lost connections

A blank screen looks broken even when the app is working. Two moments cause most of them: a search that finds nothing, and a request that fails.

Empty results

Type a nonsense word into your own search box. If the list just disappears, people assume the search broke. Show a message that names what they searched for and offers a next step:

Example

<p>No results for “asdfghjk”.</p>
<p>Try a shorter word, or <a href="/all">browse everything</a>.</p>

The same goes for empty lists on a new account: say what the list is for and how to add the first item.

Failed requests and lost connections

In Chrome's developer tools, open the Network tab and switch throttling to Offline, then use your app. Whatever you see is what a visitor in an elevator sees.

Catch failures where you make requests, show a plain message, and offer a retry:

JavaScript

try {
  const res = await fetch("/api/items");
  if (!res.ok) throw new Error("Request failed");
  render(await res.json());
} catch {
  showMessage("We could not load this. Check your connection and try again.");
}

Rely on failed requests rather than the browser's navigator.onLine flag, which only says whether a network interface is connected, not whether your server can be reached.

Loading states

If something takes more than a second, show that it is working. A spinner or a skeleton is enough. Give up after a reasonable time with the same kind of message.

Want this checked on your app?

In the complete check, App Investigators searches with made-up words, cuts the connection and slows it down, and reports blank screens and unhandled errors.

We email you once when a spot opens. No spam, and you can ask us to remove you any time at support@appinvestigators.com.

Related guides

Last updated 2026-11-24. This guide describes common problems and fixes. It is not a guarantee that any app is secure or free of bugs.