mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Reject when connection failed
This commit is contained in:
@@ -31,6 +31,10 @@ ax.interceptors.response.use(
|
||||
return res;
|
||||
},
|
||||
async (err) => {
|
||||
if (!err.response) {
|
||||
return Promise.reject(err);
|
||||
}
|
||||
|
||||
if (err.response && err.response.status === 401) {
|
||||
const { config } = err;
|
||||
|
||||
@@ -55,10 +59,6 @@ ax.interceptors.response.use(
|
||||
return Axios(config);
|
||||
}
|
||||
|
||||
// if (err.response.data.error.message === 'No auth token') {
|
||||
// auth.logout();
|
||||
// }
|
||||
|
||||
auth.logout();
|
||||
}
|
||||
return Promise.reject(err);
|
||||
|
||||
Reference in New Issue
Block a user