Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(dashboard): include HTTP status in proxy error messages (#388)
Yudhi Armyndharisbebd60daa013
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ea725f3f5..708ff6b0f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Fixed++- **Dashboard collapses duplicate connection-lost toasts during a reverse-proxy outage.** When the+ backend is unreachable behind a reverse proxy that returns a non-JSON `502`/`503` page, the+ dashboard now folds the repeated request failures into a single connection-lost toast instead of+ stacking ordinary error toasts. The thrown error now always carries the HTTP status code (which the+ toast de-duplication matches on), rather than a status text that is empty over HTTP/2. (#388)+## [0.4.7] - 2026-06-21A webhooks, reliability, and dashboard release — no breaking changes; everything is additive or adiff --git a/dashboard/src/services/api.ts b/dashboard/src/services/api.tsindex 962b081b0..16623b55b 100644--- a/dashboard/src/services/api.ts+++ b/dashboard/src/services/api.ts@@ -305,7 +305,10 @@ async function request<T>(endpoint: string, options: RequestInit = {}): Promise<}if (!response.ok) {- const error = await response.json().catch(() => ({ message: response.statusText }));+ // On a non-JSON body (e.g. a reverse-proxy 502/503 HTML page) fall through to `HTTP <status>`+ // rather than statusText: the status code is what the toast connection-lost de-dup matches on,+ // and statusText is empty over HTTP/2 anyway.+ const error = await response.json().catch(() => ({}));throw new Error(error.message || `HTTP ${response.status}`);}