fix to error handler

This commit is contained in:
CPSO 2020-05-21 02:43:24 +02:00
parent 39effc3744
commit 8ca8a597a8

View file

@ -33,12 +33,18 @@ const actions = {
commit('UPDATE_PLEX_SERVERS', response.data)
})
.catch(function (error) {
if (error.response) {
if (error.response) {
console.log(error.response.data)
console.log(error.response.status)
alert(error.response.data.error)
}
});
} else if (error.request) {
console.log(error.request);
} else {
console.log('Error', error.message);
}
});
}
};
const getters = {
plexServers: state => state.plexServers