From 509481ef06029178412b25cf979d5250ddd01a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sun, 6 Sep 2020 20:29:02 +0200 Subject: [PATCH] Ignore more proxy disconnect codes (#6805) Co-authored-by: Bram Kragten --- hassio/src/dashboard/hassio-update.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hassio/src/dashboard/hassio-update.ts b/hassio/src/dashboard/hassio-update.ts index 3bb15444ed..9bb6cc73ec 100644 --- a/hassio/src/dashboard/hassio-update.ts +++ b/hassio/src/dashboard/hassio-update.ts @@ -164,8 +164,9 @@ export class HassioUpdate extends LitElement { try { await this.hass.callApi>("POST", item.apiPath); } catch (err) { - // Only show an error if the status code was not 504, or no status at all (connection terminated) - if (err.status_code && err.status_code !== 504) { + // Only show an error if the status code was not expected (user behind proxy) + // or no status at all(connection terminated) + if (err.status_code && ![502, 503, 504].includes(err.status_code)) { showAlertDialog(this, { title: "Update failed", text: extractApiErrorMessage(err),