Skip to content

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

fixes #74 fallback for findEntryStatus when match is missing or otherwise invalid

Nicholas Palenchar1a38f519f4cf
diff --git a/assets/css/styles.scss b/assets/css/styles.scss
index c58fca5ab..1c061a7f3 100644
--- a/assets/css/styles.scss
+++ b/assets/css/styles.scss
@@ -278,6 +278,10 @@ ol li {
background-color: #B71C1C;
}
+.missing-data-response {
+ background-color: #676767;
+}
+
fieldset#history {
.method-list-item {
position: relative;
diff --git a/pages/index.vue b/pages/index.vue
index 2cb4ddc04..2d07d9103 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -241,6 +241,13 @@
statusCodeRegex: new RegExp(/[5][0-9]+/),
className: 'sv-error-response'
},
+ {
+ // this object is a catch-all for when no other objects match and should always be last
+ name: 'unknown',
+ statusCodeRegex: new RegExp(/.*/),
+ className: 'missing-data-response'
+ }
+
];
const parseHeaders = xhr => {
const headers = xhr.getAllResponseHeaders().trim().split(/[\r\n]+/);