mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-11 00:03:44 +08:00
keeping some code that was used to test exception interception
This commit is contained in:
parent
7d4759017c
commit
30b335f8eb
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue