#111188Live search shows "Something went wrong." while typing when a request is aborted
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
- Open the live search in the backend toolbar.
- 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.
- 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
-
Gerrit Code Review pushed patch set 1 for main to change 96965 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-21T08:58:59+00:00" > 10/21/26, 08:58 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96965 <span data-processor="relativetime" data-value="2026-11-10T07:48:46+00:00" > 11/10/26, 07:48 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96965 <span data-processor="relativetime" data-value="2026-11-17T20:20:55+00:00" > 11/17/26, 20:20 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96965 <span data-processor="relativetime" data-value="2026-11-17T20:20:59+00:00" > 11/17/26, 20:20 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 97783 <span data-processor="relativetime" data-value="2026-11-18T09:11:16+00:00" > 11/18/26, 09:11 </span>
-
Lukas Niestroj commented and changed status
Under ReviewResolved done0 %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.