Handle connection drops when upgrading (#6767)

This commit is contained in:
Joakim Sørensen 2020-09-02 16:21:59 +02:00 committed by GitHub
parent c7f8fe1468
commit 8e506f7749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,8 +161,8 @@ export class HassioUpdate extends LitElement {
try {
await this.hass.callApi<HassioResponse<void>>("POST", item.apiPath);
} catch (err) {
// Only show an error if the status code was not 504 (timeout reported by proxies)
if (err.status_code !== 504) {
// 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) {
showAlertDialog(this, {
title: "Update failed",
text: