fix: unified error handling for GotoAnything search actions (#23715)
This commit is contained in:
parent
ff791efe18
commit
0c5e66bccb
7 changed files with 285 additions and 67 deletions
|
|
@ -18,7 +18,13 @@ export const searchAnything = async (
|
|||
): Promise<SearchResult[]> => {
|
||||
if (actionItem) {
|
||||
const searchTerm = query.replace(actionItem.key, '').replace(actionItem.shortcut, '').trim()
|
||||
return await actionItem.search(query, searchTerm, locale)
|
||||
try {
|
||||
return await actionItem.search(query, searchTerm, locale)
|
||||
}
|
||||
catch (error) {
|
||||
console.warn(`Search failed for ${actionItem.key}:`, error)
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
if (query.startsWith('@'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue