diff --git a/packages/hoppscotch-app/components/http/CodegenModal.vue b/packages/hoppscotch-app/components/http/CodegenModal.vue
index dcafba0d..9901aed4 100644
--- a/packages/hoppscotch-app/components/http/CodegenModal.vue
+++ b/packages/hoppscotch-app/components/http/CodegenModal.vue
@@ -54,7 +54,7 @@
{{ t("error.something_went_wrong") }}
@@ -114,6 +114,7 @@ const options = ref
(null)
const request = ref(getRESTRequest())
const codegenType = ref("shell-curl")
const copyIcon = ref("copy")
+const errorState = ref(false)
const requestCode = computed(() => {
const effectiveRequest = getEffectiveRESTRequest(
@@ -126,9 +127,10 @@ const requestCode = computed(() => {
const result = generateCode(codegenType.value, effectiveRequest)
if (O.isSome(result)) {
+ errorState.value = false
return result.value
} else {
- // TODO: Error logic?
+ errorState.value = true
return ""
}
})