This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fill_details = () => { | |
return new Promise(resolve => { | |
resolve('done'); | |
}); | |
} | |
let async_call_fill_details = async () => { | |
const result = await fill_details(); | |
} | |
async_call_fill_details(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.axios.interceptors.response.use(undefined, error => { | |
switch(error.response.status){ | |
case 401: // Not logged in | |
case 419: // Session expired | |
case 503: // Down for maintenance | |
window.location.reload(); | |
break; | |
case 500: | |
alert('Oops, something went wrong! The team have been notified.'); | |
break; |