From fa3160f67e95c9af0b83e25bec0e0ad3880a7aac Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Wed, 17 Jun 2026 19:37:55 +0700 Subject: [PATCH] fix: show visible error alert when survey fails (e.g. simulation env not running) --- frontend/src/components/Step5Interaction.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Step5Interaction.vue b/frontend/src/components/Step5Interaction.vue index 9eb791a..7c5999c 100644 --- a/frontend/src/components/Step5Interaction.vue +++ b/frontend/src/components/Step5Interaction.vue @@ -862,10 +862,14 @@ const submitSurvey = async () => { surveyResults.value = surveyResultsList addLog(t('log.receivedReplies', { count: surveyResults.value.length })) } else { - throw new Error(res.error || t('step5.requestFailed')) + const errMsg = res.error || t('step5.requestFailed') + addLog(`❌ ${errMsg}`) + alert(errMsg) } } catch (err) { - addLog(t('log.surveySendFailed', { error: err.message })) + const errMsg = err.message || t('step5.requestFailed') + addLog(`❌ ${t('log.surveySendFailed', { error: errMsg })}`) + alert(`Survey failed: ${errMsg}`) } finally { isSurveying.value = false }