diff --git a/packages/hoppscotch-common/src/components/http/Response.vue b/packages/hoppscotch-common/src/components/http/Response.vue
index f83afcc9d..2f6c75152 100644
--- a/packages/hoppscotch-common/src/components/http/Response.vue
+++ b/packages/hoppscotch-common/src/components/http/Response.vue
@@ -3,40 +3,32 @@
-
diff --git a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
index 79a71b33e..f2d1f139a 100644
--- a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
+++ b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
@@ -107,7 +107,7 @@ const t = useI18n()
const colorMode = useColorMode()
const props = defineProps<{
- response: HoppRESTResponse
+ response: HoppRESTResponse | null
}>()
/**
@@ -118,6 +118,7 @@ const props = defineProps<{
*/
const readableResponseSize = computed(() => {
if (
+ props.response === null ||
props.response.type === "loading" ||
props.response.type === "network_fail" ||
props.response.type === "script_fail" ||
@@ -135,6 +136,7 @@ const readableResponseSize = computed(() => {
const statusCategory = computed(() => {
if (
+ props.response === null ||
props.response.type === "loading" ||
props.response.type === "network_fail" ||
props.response.type === "script_fail" ||
diff --git a/packages/hoppscotch-common/src/components/lenses/HeadersRenderer.vue b/packages/hoppscotch-common/src/components/lenses/HeadersRenderer.vue
index 5f1963423..d853e2a8e 100644
--- a/packages/hoppscotch-common/src/components/lenses/HeadersRenderer.vue
+++ b/packages/hoppscotch-common/src/components/lenses/HeadersRenderer.vue
@@ -27,18 +27,18 @@
diff --git a/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts b/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
index 811c325aa..b43f6f6fd 100644
--- a/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
+++ b/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
@@ -1,10 +1,12 @@
import { HoppRESTRequest } from "@hoppscotch/data"
+export type HoppRESTResponseHeader = { key: string; value: string }
+
export type HoppRESTResponse =
| { type: "loading"; req: HoppRESTRequest }
| {
type: "fail"
- headers: { key: string; value: string }[]
+ headers: HoppRESTResponseHeader[]
body: ArrayBuffer
statusCode: number
@@ -27,7 +29,7 @@ export type HoppRESTResponse =
}
| {
type: "success"
- headers: { key: string; value: string }[]
+ headers: HoppRESTResponseHeader[]
body: ArrayBuffer
statusCode: number
meta: {