Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): stop the restart dialog claiming a proxy timeout

Yudhi Armyndharis4f712f3e3caa
diff --git a/dashboard/src/hooks/useRestartFlow.ts b/dashboard/src/hooks/useRestartFlow.ts
index 2c680aedd..c445356cb 100644
--- a/dashboard/src/hooks/useRestartFlow.ts
+++ b/dashboard/src/hooks/useRestartFlow.ts
@@ -154,9 +154,10 @@ export function useRestartFlow(): RestartFlow {
if (typeof failure?.status === 'number') {
stopCountdown();
setRestartCountdown(0);
- // A 504, or a 502 the gateway did not stamp with a code, came from a proxy that stopped waiting.
- // The request may still be running (a first-time enable pulls an image before the restart), so
- // this is neither a refusal nor something a readiness poll can settle: the old process answers.
+ // A 504, or a 502 the gateway did not stamp with a code, is a proxy answering in the gateway's place:
+ // a timeout, or an upstream connection that failed or dropped. The client cannot tell which, and the
+ // request may still be running (a first-time enable pulls an image before the restart), so this is
+ // neither a refusal nor something a readiness poll can settle: the old process answers.
if (failure.status === 504 || (failure.status === 502 && failure.code === undefined)) {
setRestartStatus('unknown');
return;
diff --git a/dashboard/src/i18n/locales/ar.json b/dashboard/src/i18n/locales/ar.json
index b5cd8f4d8..0079dacf8 100644
--- a/dashboard/src/i18n/locales/ar.json
+++ b/dashboard/src/i18n/locales/ar.json
@@ -984,7 +984,7 @@
"dontClose": "يرجى عدم إغلاق هذه النافذة",
"successMsg": "الخادم يعمل مرة أخرى! ستُحدَّث الصفحة تلقائياً.",
"errorMsg": "لم يستجب الخادم بعد 30 ثانية. يرجى مراجعة سجلات Docker وإعادة التشغيل يدوياً.",
- "outcomeUnknown": "انتهت مهلة الوكيل قبل أن يستجيب الخادم. قد تكون إعادة التشغيل لا تزال جارية؛ أعد تحميل الصفحة بعد دقيقة للتحقق.",
+ "outcomeUnknown": "أعاد الوكيل خطأً قبل أن يستجيب الخادم، لذا لا يُعرف ما إذا كانت إعادة التشغيل جارية. أعد تحميل الصفحة بعد دقيقة للتحقق.",
"reload": "إعادة تحميل الصفحة"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/de.json b/dashboard/src/i18n/locales/de.json
index 8650c7f83..900be1d14 100644
--- a/dashboard/src/i18n/locales/de.json
+++ b/dashboard/src/i18n/locales/de.json
@@ -979,7 +979,7 @@
"dontClose": "Bitte schließe dieses Fenster nicht",
"successMsg": "Der Server ist wieder online! Die Seite wird automatisch neu geladen.",
"errorMsg": "Der Server hat nach 30 Sekunden nicht geantwortet. Prüfe die Docker-Protokolle und starte ihn manuell neu.",
- "outcomeUnknown": "Der Proxy hat das Warten aufgegeben, bevor der Server geantwortet hat. Der Neustart läuft möglicherweise noch; lade die Seite in einer Minute neu, um es zu prüfen.",
+ "outcomeUnknown": "Der Proxy hat einen Fehler zurückgegeben, bevor der Server geantwortet hat. Ob der Neustart läuft, ist daher unklar; lade die Seite in einer Minute neu, um es zu prüfen.",
"reload": "Seite neu laden"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/en.json b/dashboard/src/i18n/locales/en.json
index 8068ef693..2c33efe23 100644
--- a/dashboard/src/i18n/locales/en.json
+++ b/dashboard/src/i18n/locales/en.json
@@ -979,7 +979,7 @@
"dontClose": "Please do not close this window",
"successMsg": "Server is back online! The page will reload automatically.",
"errorMsg": "Server did not respond after 30 seconds. Please check the Docker logs and restart manually.",
- "outcomeUnknown": "The proxy timed out before the server answered. The restart may still be in progress; reload in a minute to check.",
+ "outcomeUnknown": "The proxy returned an error before the server answered, so it is not known whether the restart is in progress. Reload in a minute to check.",
"reload": "Reload Page"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/es.json b/dashboard/src/i18n/locales/es.json
index cf52f194b..1a9442048 100644
--- a/dashboard/src/i18n/locales/es.json
+++ b/dashboard/src/i18n/locales/es.json
@@ -965,7 +965,7 @@
"dontClose": "Por favor, no cierres esta ventana",
"successMsg": "¡El servidor volvió a estar en línea! La página se recargará automáticamente.",
"errorMsg": "El servidor no respondió tras 30 segundos. Revisa los logs de Docker y reinicia manualmente.",
- "outcomeUnknown": "El proxy agotó el tiempo de espera antes de que el servidor respondiera. Es posible que el reinicio siga en curso; recarga la página en un minuto para comprobarlo.",
+ "outcomeUnknown": "El proxy devolvió un error antes de que el servidor respondiera, así que no se sabe si el reinicio está en curso. Recarga la página en un minuto para comprobarlo.",
"reload": "Recargar página"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/fr.json b/dashboard/src/i18n/locales/fr.json
index f5ec729f2..ae9796b50 100644
--- a/dashboard/src/i18n/locales/fr.json
+++ b/dashboard/src/i18n/locales/fr.json
@@ -965,7 +965,7 @@
"dontClose": "Veuillez ne pas fermer cette fenêtre",
"successMsg": "Le serveur est de nouveau en ligne ! La page va se recharger automatiquement.",
"errorMsg": "Le serveur n'a pas répondu après 30 secondes. Veuillez vérifier les journaux Docker et redémarrer manuellement.",
- "outcomeUnknown": "Le proxy a expiré avant que le serveur ne réponde. Le redémarrage est peut-être encore en cours ; rechargez la page dans une minute pour vérifier.",
+ "outcomeUnknown": "Le proxy a renvoyé une erreur avant que le serveur ne réponde ; on ne sait donc pas si le redémarrage est en cours. Rechargez la page dans une minute pour vérifier.",
"reload": "Recharger la page"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/he.json b/dashboard/src/i18n/locales/he.json
index 521ff2edd..b25002fc2 100644
--- a/dashboard/src/i18n/locales/he.json
+++ b/dashboard/src/i18n/locales/he.json
@@ -966,7 +966,7 @@
"dontClose": "אין לסגור חלון זה",
"successMsg": "השרת חזר לפעולה! הדף ייטען מחדש אוטומטית.",
"errorMsg": "השרת לא הגיב לאחר 30 שניות. יש לבדוק את לוגי Docker ולאתחל ידנית.",
- "outcomeUnknown": "ה-proxy הגיע לזמן הקצוב לפני שהשרת הגיב. ייתכן שהאתחול עדיין מתבצע; יש לטעון את הדף מחדש בעוד דקה כדי לבדוק.",
+ "outcomeUnknown": "ה-proxy החזיר שגיאה לפני שהשרת הגיב, ולכן לא ידוע אם האתחול מתבצע. יש לטעון את הדף מחדש בעוד דקה כדי לבדוק.",
"reload": "טעינת הדף מחדש"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/hi.json b/dashboard/src/i18n/locales/hi.json
index 722865345..f4d8ce96d 100644
--- a/dashboard/src/i18n/locales/hi.json
+++ b/dashboard/src/i18n/locales/hi.json
@@ -979,7 +979,7 @@
"dontClose": "कृपया इस विंडो को बंद न करें",
"successMsg": "सर्वर वापस ऑनलाइन है! पृष्ठ स्वचालित रूप से पुनः लोड होगा।",
"errorMsg": "सर्वर ने 30 सेकंड के बाद जवाब नहीं दिया। कृपया Docker लॉग की जाँच करें और मैन्युअल रूप से पुनरारंभ करें।",
- "outcomeUnknown": "सर्वर के जवाब देने से पहले प्रॉक्सी का समय समाप्त हो गया। पुनरारंभ अभी भी जारी हो सकता है; जाँचने के लिए एक मिनट बाद पृष्ठ पुनः लोड करें।",
+ "outcomeUnknown": "सर्वर के जवाब देने से पहले प्रॉक्सी ने त्रुटि लौटाई, इसलिए पता नहीं कि पुनरारंभ जारी है या नहीं। जाँचने के लिए एक मिनट बाद पृष्ठ पुनः लोड करें।",
"reload": "पृष्ठ पुनः लोड करें"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/it.json b/dashboard/src/i18n/locales/it.json
index d30b1fc70..a20ee139a 100644
--- a/dashboard/src/i18n/locales/it.json
+++ b/dashboard/src/i18n/locales/it.json
@@ -965,7 +965,7 @@
"dontClose": "Si prega di non chiudere questa finestra",
"successMsg": "Il server è di nuovo online! La pagina si ricaricherà automaticamente.",
"errorMsg": "Il server non ha risposto dopo 30 secondi. Controlla i log di Docker e riavvia manualmente.",
- "outcomeUnknown": "Il proxy è andato in timeout prima che il server rispondesse. Il riavvio potrebbe essere ancora in corso; ricarica la pagina tra un minuto per verificare.",
+ "outcomeUnknown": "Il proxy ha restituito un errore prima che il server rispondesse, quindi non si sa se il riavvio sia in corso. Ricarica la pagina tra un minuto per verificare.",
"reload": "Ricarica Pagina"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/ko.json b/dashboard/src/i18n/locales/ko.json
index ed5bdeee9..583fe498c 100644
--- a/dashboard/src/i18n/locales/ko.json
+++ b/dashboard/src/i18n/locales/ko.json
@@ -979,7 +979,7 @@
"dontClose": "이 창을 닫지 마세요",
"successMsg": "서버가 다시 온라인 상태입니다! 페이지가 자동으로 새로고침됩니다.",
"errorMsg": "서버가 30초 동안 응답하지 않았습니다. Docker 로그를 확인하고 수동으로 재시작하세요.",
- "outcomeUnknown": "서버가 응답하기 전에 프록시 시간이 초과되었습니다. 재시작이 아직 진행 중일 수 있으니 1분 후 페이지를 새로고침하여 확인하세요.",
+ "outcomeUnknown": "서버가 응답하기 전에 프록시가 오류를 반환하여 재시작이 진행 중인지 알 수 없습니다. 1분 후 페이지를 새로고침하여 확인하세요.",
"reload": "페이지 새로고침"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/pt-BR.json b/dashboard/src/i18n/locales/pt-BR.json
index b9789d6b6..e3c3af1e0 100644
--- a/dashboard/src/i18n/locales/pt-BR.json
+++ b/dashboard/src/i18n/locales/pt-BR.json
@@ -965,7 +965,7 @@
"dontClose": "Por favor, não feche esta janela",
"successMsg": "O servidor voltou a ficar online! A página será recarregada automaticamente.",
"errorMsg": "O servidor não respondeu após 30 segundos. Verifique os logs do Docker e reinicie manualmente.",
- "outcomeUnknown": "O proxy atingiu o tempo limite antes de o servidor responder. A reinicialização ainda pode estar em andamento; recarregue a página em um minuto para verificar.",
+ "outcomeUnknown": "O proxy retornou um erro antes de o servidor responder, então não é possível saber se a reinicialização está em andamento. Recarregue a página em um minuto para verificar.",
"reload": "Recarregar página"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/te.json b/dashboard/src/i18n/locales/te.json
index 0d6ec13ad..3df96d880 100644
--- a/dashboard/src/i18n/locales/te.json
+++ b/dashboard/src/i18n/locales/te.json
@@ -959,7 +959,7 @@
"dontClose": "దయచేసి ఈ విండోను మూసివేయవద్దు",
"successMsg": "సర్వర్ తిరిగి ఆన్‌లైన్‌లోకి వచ్చింది! పేజీ స్వయంచాలకంగా రీలోడ్ అవుతుంది.",
"errorMsg": "30 సెకన్ల తర్వాత కూడా సర్వర్ స్పందించలేదు. దయచేసి డోకర్ (Docker) లాగ్‌లను తనిఖీ చేసి, మాన్యువల్‌గా రీస్టార్ట్ చేయండి.",
- "outcomeUnknown": "సర్వర్ స్పందించే ముందే ప్రాక్సీ సమయం ముగిసింది. రీస్టార్ట్ ఇంకా కొనసాగుతూ ఉండవచ్చు; తనిఖీ చేయడానికి ఒక నిమిషం తర్వాత పేజీని రీలోడ్ చేయండి.",
+ "outcomeUnknown": "సర్వర్ స్పందించే ముందే ప్రాక్సీ లోపాన్ని తిరిగి ఇచ్చింది, కాబట్టి రీస్టార్ట్ కొనసాగుతోందో లేదో తెలియదు. తనిఖీ చేయడానికి ఒక నిమిషం తర్వాత పేజీని రీలోడ్ చేయండి.",
"reload": "పేజీని రీలోడ్ చేయి"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/tr.json b/dashboard/src/i18n/locales/tr.json
index 3e766d106..838878287 100644
--- a/dashboard/src/i18n/locales/tr.json
+++ b/dashboard/src/i18n/locales/tr.json
@@ -979,7 +979,7 @@
"dontClose": "Lütfen bu pencereyi kapatmayın",
"successMsg": "Sunucu tekrar çevrimiçi! Sayfa otomatik olarak yeniden yüklenecektir.",
"errorMsg": "Sunucu 30 saniye sonra yanıt vermedi. Lütfen Docker kayıtlarını kontrol edin ve manuel olarak yeniden başlatın.",
- "outcomeUnknown": "Sunucu yanıt vermeden önce proxy zaman aşımına uğradı. Yeniden başlatma hâlâ sürüyor olabilir; kontrol etmek için bir dakika sonra sayfayı yeniden yükleyin.",
+ "outcomeUnknown": "Sunucu yanıt vermeden önce proxy bir hata döndürdü, bu nedenle yeniden başlatmanın sürüp sürmediği bilinmiyor. Kontrol etmek için bir dakika sonra sayfayı yeniden yükleyin.",
"reload": "Sayfayı Yeniden Yükle"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/zh-CN.json b/dashboard/src/i18n/locales/zh-CN.json
index fbd0ba032..7b2162435 100644
--- a/dashboard/src/i18n/locales/zh-CN.json
+++ b/dashboard/src/i18n/locales/zh-CN.json
@@ -959,7 +959,7 @@
"dontClose": "请不要关闭此窗口",
"successMsg": "服务器已恢复在线!页面将自动重新加载。",
"errorMsg": "服务器在 30 秒后仍无响应。请检查 Docker 日志并手动重启。",
- "outcomeUnknown": "服务器响应前代理已超时。重启可能仍在进行中;请在一分钟后重新加载页面查看。",
+ "outcomeUnknown": "服务器响应前代理返回了错误,因此无法确定重启是否正在进行。请在一分钟后重新加载页面查看。",
"reload": "重新加载页面"
},
"toasts": {
diff --git a/dashboard/src/i18n/locales/zh-HK.json b/dashboard/src/i18n/locales/zh-HK.json
index 47e2cb544..11d71f483 100644
--- a/dashboard/src/i18n/locales/zh-HK.json
+++ b/dashboard/src/i18n/locales/zh-HK.json
@@ -959,7 +959,7 @@
"dontClose": "請不要關閉此視窗",
"successMsg": "伺服器已重新上線!頁面將自動重新載入。",
"errorMsg": "伺服器在 30 秒後仍未回應。請檢查 Docker 記錄並手動重新啟動。",
- "outcomeUnknown": "伺服器回應前代理已逾時。重新啟動可能仍在進行中;請在一分鐘後重新載入頁面查看。",
+ "outcomeUnknown": "伺服器回應前代理傳回了錯誤,因此無法確定重新啟動是否正在進行。請在一分鐘後重新載入頁面查看。",
"reload": "重新載入頁面"
},
"toasts": {
diff --git a/dashboard/src/pages/Infrastructure.test.ts b/dashboard/src/pages/Infrastructure.test.ts
index 9a74cf868..37d09c522 100644
--- a/dashboard/src/pages/Infrastructure.test.ts
+++ b/dashboard/src/pages/Infrastructure.test.ts
@@ -780,7 +780,7 @@ test(
fireEvent.click(within(dialog).getByRole('button', { name: 'Restart Now' }));
await within(dialog).findByText(
- 'The proxy timed out before the server answered. The restart may still be in progress; reload in a minute to check.',
+ 'The proxy returned an error before the server answered, so it is not known whether the restart is in progress. Reload in a minute to check.',
);
assert.equal(within(dialog).queryByText('Restart failed'), null);
assert.equal(within(dialog).queryByText('HTTP 504'), null);
@@ -819,7 +819,7 @@ test('a proxy 502 without a gateway code on the restart request reports an unkno
const dialog = await clickRestartNow();
await within(dialog).findByText(
- 'The proxy timed out before the server answered. The restart may still be in progress; reload in a minute to check.',
+ 'The proxy returned an error before the server answered, so it is not known whether the restart is in progress. Reload in a minute to check.',
);
assert.equal(within(dialog).queryByText('Restart failed'), null);
});