mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Better error handling for search
This commit is contained in:
parent
6cb14f3ed3
commit
6d21730fb9
1 changed files with 3 additions and 2 deletions
|
|
@ -277,6 +277,9 @@ export function useGetLibraryItems(
|
|||
query: fullQuery,
|
||||
includeContent: false,
|
||||
})) as LibraryItemsData
|
||||
if (response.search.errorCodes?.length) {
|
||||
throw new Error(response.search.errorCodes[0])
|
||||
}
|
||||
let wasUnchanged = false
|
||||
if (cached && cached.pageParams.indexOf(pageParam) > -1) {
|
||||
const idx = cached.pageParams.indexOf(pageParam)
|
||||
|
|
@ -326,8 +329,6 @@ export function useGetLibraryItems(
|
|||
return true
|
||||
})
|
||||
)
|
||||
console.log('setting filteredPages: ', filteredPages)
|
||||
|
||||
return {
|
||||
...data,
|
||||
pages: filteredPages,
|
||||
|
|
|
|||
Loading…
Reference in a new issue