avantifellows/plio-frontend

TypeError: Cannot read properties of undefined (reading 'name')

dalmia opened this issue · 0 comments

./src/services/API/ErrorHandling.js
 
 const toast = useToast();
 
 export default {
   handleAPIErrors(error) {
>    if (!error.response && this.$route.name != "Plio") {
      // do not show toast for embedded plio
      toast.error(i18n.global.t("error.internet"));
    } else if (error.response.status === 404) router.replace({ name: "404" });
  },
};