keeping some code that was used to test exception interception

This commit is contained in:
Miodec 2021-06-16 20:18:59 +01:00
parent 7d4759017c
commit 30b335f8eb

View file

@ -39,4 +39,16 @@ axiosInstance.interceptors.request.use(
}
);
axiosInstance.interceptors.response.use((response) => response, (error) => {
// whatever you want to do with the error
// console.log('interctepted');
// if(error.response.data.message){
// Notifications.add(`${error.response.data.message}`);
// }else{
// Notifications.add(`${error.response.status} ${error.response.statusText}`);
// }
// return error.response;
throw error;
});
export default axiosInstance;