Skip to content
Astera Technology

Empty results or unavailable data?

Separate a successful zero-result query from a failed or incomplete search response.

Choose against the task constraints

A fictional staff search applies status=ready. One completed response returns zero matching records. Another request fails with no usable response, and a third is still pending. Only the first establishes that the current search found nothing.

Decision worksheet
ConditionSuccessful empty stateUnavailable/pending state
Completed zero-result responseExplain which filter found no recordsAn outage message would be inaccurate
No trustworthy responseCannot claim the queue is emptyOffer retry or preserve prior labelled data
Request still pendingDo not announce final zero matchesDisplay current loading state without replacing certainty
Download editable CSV ↓

Keep response status separate from result length. A failed fetch must not fall through to an empty array that looks like a successful search. If retaining an earlier result, name its earlier status rather than presenting it as newly verified.

Classify the three outcomes

Synthetic task cases
RequestObserved evidenceDisplay
R-ACompleted; matches=[]No ready records
R-BFailed; no bodySearch unavailable
R-CPromise pendingLoading
Download editable CSV ↓

Can R-B show the same empty message as R-A?

Show the worked answer

No. R-B provides no evidence about the number of ready records. Keep the unavailable state and allow recovery without inventing an empty queue.

Check the chosen interaction

  • Test successful zero, failure and pending as separate cases.
  • A late response from an older query cannot overwrite a newer search.
  • Retry preserves the intended filter and entered query.

Related resources