axios.interceptors.response.use(
function(response) {
return Promise.resolve(response)
},
function(error) {
console.log(error.response)
return Promise.reject(error)
}
)
this is not work. for example, i have other axios request and this code works perfect, but not with vue-table2.
look at this screenshot

First error is vue-table2 request. when it unauthorized (error), the axios interceptors not working. But take a look the second error. The second error is my other axios request, it unauthorized too, but interceptors is working.
how to fix this? help me mr. @ratiw
It's working now using http-fetch
<vuetable ref="vuetable" :api-url="vuetable.apiUrl"
:fields="vuetable.fields" :append-params="filter" pagination-path=""
:per-page="perPage" @vuetable:pagination-data="onPaginationData"
:css="vuetable.css.table" :http-fetch="myFetch">
add :http-fetch="myFetch" to vuetable component
then create method
myFetch(apiUrl, httpOptions) {
return axios.get(apiUrl, httpOptions)
},
Most helpful comment
It's working now using http-fetch
add :http-fetch="myFetch" to vuetable component
then create method