Add error handling for search filters
This commit is contained in:
parent
a7cd21b7ad
commit
351a6a3992
|
@ -49,6 +49,9 @@ const actions = {
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
commit('toggleIsYtSearchRunning')
|
commit('toggleIsYtSearchRunning')
|
||||||
})
|
})
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
reject(err)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ytsr(payload.query, payload.options).then((result) => {
|
ytsr(payload.query, payload.options).then((result) => {
|
||||||
|
@ -66,7 +69,7 @@ const actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
ytSearchGetFilters ({ rootState }, payload) {
|
ytSearchGetFilters ({ rootState }, payload) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve, reject) => {
|
||||||
let filter = payload.query
|
let filter = payload.query
|
||||||
let searchSettings = payload.searchSettings
|
let searchSettings = payload.searchSettings
|
||||||
|
|
||||||
|
@ -108,6 +111,8 @@ const actions = {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}).catch((err) => {
|
||||||
|
reject(err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue