aglinxinyuan commented on code in PR #8701:
URL: https://github.com/apache/texera/pull/8701#discussion_r4366302108


##########
frontend/src/app/dashboard/component/user/search-bar/search-bar.component.ts:
##########
@@ -107,12 +107,15 @@ export class SearchBarComponent {
         this.includePublic
       );
 
+      // A failed request or a row convertToName cannot name costs this query 
its suggestions, not the
+      // subscription in the constructor, which would otherwise end and leave 
autocomplete dead for the session.
       return searchObservable.pipe(
         switchMap((result: SearchResult) => {
           const uniqueResults = Array.from(new Set(result.results.map(item => 
this.convertToName(item))));
           this.addToCache(query, uniqueResults);
           return of(uniqueResults);
-        })
+        }),
+        catchError(() => of([]))

Review Comment:
   Applied — `convertToName`, the `SearchService` filter and its hub enrichment 
now all read a row through one `searchResultPayload` lookup, so they can't 
disagree, and the catch wraps only the request like `FiltersComponent`, so a 
naming error reaches the console again (0cd23777d6). A failed request still 
clears the dropdown and isn't cached, and the funnel spec now includes a row 
with all-`null` payload fields, the way the server writes a kind we don't model.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to