mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 12:49:30 +00:00
c490440424
Opening a search result aborts the search, which rejects whatever request is still in flight. The rejection lands in the same handler as a real failure, so the user was shown a "Search failed: signal is aborted without reason" dialog for doing nothing more than clicking a result. There is a guard for this already, but it only covers the case where the component has come apart first: `aborted` is set by the unmount cleanup, and the rejection often arrives before React gets that far. An AbortError is now recognised for what it is and dropped, whichever way round the two happen to land. Nothing else changes: a rejection from any other cause still reaches the error dialog, since that is a failure nobody asked for. Tests: a search rejected with an AbortError no longer reports an error, and one rejected with anything else still does. Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>