Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const errorHandler = event => {
if (!event.reason) return;
if (event.reason instanceof Error) {
if (VueRouter.isNavigationFailure(event.reason)) {
return;
}
$message.fuck(event.reason);
return;
}
if (event.reason.isAxiosError) {
// $message.fuck(event.reason);
$notify.fuck(event.reason);
return;
}
if (axios.isCancel(event.reason)) {
event.preventDefault();
return;