Skip to content

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

Display error message

Abraham Williamscd10b56aa64b
diff --git a/script.js b/script.js
index b2c082a02..ea38ac3f1 100644
--- a/script.js
+++ b/script.js
@@ -136,6 +136,10 @@ const app = new Vue({
this.response.body = xhr.responseText
}
}
+ xhr.onerror = e => {
+ this.response.status = '0'
+ this.response.body = 'Error ;('
+ }
},
addRequestParam() {
this.params.push({