Issue Bug Resolved

#111188Live search shows "Something went wrong." while typing when a request is aborted

Lukas Niestroj 10/21/26, 08:43 updated 11/18/26, 09:19

Description

Problem

The backend live search shows the error message “Something went wrong.” after almost every keystroke while typing, until the last search request answers and the results replace it. It is most visible on installations where a search takes longer than the input debounce (e.g. ~1-3 s with many records).

Steps to reproduce

  1. Open the live search in the backend toolbar.
  2. Type a search term slowly, pausing slightly longer than the input debounce between characters (e.g. 0.4 s), so that each keystroke starts a new request while the previous one is still running.
  3. Observe: the result area shows “Something went wrong.” instead of the loading spinner until the last request has answered.

Cause

Every new search aborts the running request (this.currentSearchRequest?.abort()). Since #108514 the catch block in Build/Sources/TypeScript/backend/toolbar/live-search.ts (LiveSearch::search()) calls this.updateSearchResults(null, true) before it checks for the AbortError. The aborted request therefore sets hasErrors and resets loading on the result container while the new request is still running.

Suggested fix

--- a/Build/Sources/TypeScript/backend/toolbar/live-search.ts
+++ b/Build/Sources/TypeScript/backend/toolbar/live-search.ts
       } catch (err: unknown) {
-        this.updateSearchResults(null, true);
         if (err instanceof DOMException && err.name === 'AbortError') {
-          // Request has been aborted, do not flood the error console
+          // Request has been aborted by a newer search, which updates the results itself
           return;
         }

+        this.updateSearchResults(null, true);
         // Something else happened, throw again
         throw err;
       }

Reviews 2

History 16

  1. Lukas Niestroj commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-11-18T09:19:42+00:00" > 11/18/26, 09:19 </span>

    Applied in changeset commit:6acc8d5d71e760517db840dea3501f9a75f40efa.