Closed gwachhamit closed 4 years ago
Sorry, for the silly question. I fixed it by adding error in ajax request.
ajax: {
url: '/admin/brands',
error: function (xhr, error, thrown) {
if(xhr.status === 401){
location.replace('/login');
}else {
console.log(error, thrown);
}
}
},
How to disable alert of error message? and I want to catch error response code mannually. Because I want to redirect to login if the response status code is 401.