0👍
Hmmm, Ok, I do it
on error:
(error) => {
HelpersService.internalServerErrorToast();
next(false);
}
in service:
internalServerErrorToast() {
let bootStrapToaster = new BToast();
bootStrapToaster.$bvToast.toast("500", {
title: "Internal Server Error",
toaster: "b-toaster-bottom-right",
solid: true,
variant: "danger",
appendToast: false,
noCloseButton: true,
toastClass: "internalErrorToast",
});
}
- [Vuejs]-How to make sense of, and then effectively use the console warnings and errors in vue?
- [Vuejs]-Convert two dimensional associated array to Object using vue.js
0👍
Why you are not using catch. If you are using then
, you can use catch
.
beforeEnter: function(to, form, next) {
this.getData().then((response) => {
next();
}).catch(error => {
throw error
})
}
Try this. If not work, comment, We will do something else.
Source:stackexchange.com