Ignore more proxy disconnect codes (#6805)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Joakim Sørensen 2020-09-06 20:29:02 +02:00 committed by GitHub
parent 9aa8175e23
commit 509481ef06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,8 +164,9 @@ 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, 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),