Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

:bug: Added error handler

Liyas Thomas10f6bb9cc628
diff --git a/pages/doc.vue b/pages/doc.vue
index 6a68099b6..c91216409 100644
--- a/pages/doc.vue
+++ b/pages/doc.vue
@@ -131,7 +131,16 @@ export default {
},
getDoc() {
- this.items = JSON.parse(this.collectionJSON);
+ try {
+ this.items = JSON.parse(this.collectionJSON);
+ this.$toast.info("Documentation generated", {
+ icon: "book"
+ });
+ } catch (e) {
+ this.$toast.error(e, {
+ icon: "code"
+ });
+ }
}
}
};