From e72356033cf8c01173174f3c5877915eeb815fde Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:28:57 +0200 Subject: [PATCH] Handle url error better when invalid blueprint url is provided (#21778) * Encode spaces again * Prettier * Update src/panels/my/ha-panel-my.ts * Remove the specific contents * Remove the error keys, assign error immediately * Revert "Remove the error keys, assign error immediately" This reverts commit 27381ff250204dc0940cd5ff1b69f441d1fdb484. --- src/panels/my/ha-panel-my.ts | 3 +++ src/translations/en.json | 1 + 2 files changed, 4 insertions(+) diff --git a/src/panels/my/ha-panel-my.ts b/src/panels/my/ha-panel-my.ts index e5a5e2c327..4d378dd461 100644 --- a/src/panels/my/ha-panel-my.ts +++ b/src/panels/my/ha-panel-my.ts @@ -432,6 +432,9 @@ class HaPanelMy extends LitElement { >`, }); break; + case "url_error": + error = this.hass.localize("ui.panel.my.url_error"); + break; default: error = this.hass.localize("ui.panel.my.error") || "Unknown error"; } diff --git a/src/translations/en.json b/src/translations/en.json index d576f6f466..e3ccecc6aa 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1852,6 +1852,7 @@ "component_not_loaded": "This redirect is not supported by your Home Assistant instance. You need the integration {integration} to use this redirect.", "no_supervisor": "This redirect is not supported by your Home Assistant installation. It needs either the Home Assistant Operating System or Home Assistant Supervised installation method. For more information, see the {docs_link}.", "not_app": "This redirect only works from a mobile device that has the Home Assistant Companion app installed. {link}.", + "url_error": "The provided URL is invalid.", "documentation": "documentation", "download_app": "Click here to download the app", "faq_link": "My Home Assistant FAQ",