remove duplicate error method

This commit is contained in:
hujambo-dunia
2022-06-01 15:07:48 -04:00
parent 24c23a7281
commit 260ff5f094
+1 -6
View File
@@ -47,13 +47,12 @@ export default {
},
created() {
this.root = getAppRoot();
urlData({ url: `api/tours` })
.then((response) => {
this.tours = response;
})
.catch((error) => {
this.error = this._errorMessage(error);
this.error = error;
});
},
methods: {
@@ -70,10 +69,6 @@ export default {
(tour.tags && tour.tags.join().toLowerCase().includes(query))
);
},
_errorMessage(e) {
const message = e && e.response && e.response.data && e.response.data.err_msg;
return message || "Request failed for an unknown reason.";
},
},
};
</script>