Catch exception if diagnostics are not supported for domain (#17067)

This commit is contained in:
Philip Allgaier 2023-06-28 14:48:37 +02:00 committed by GitHub
parent 32a9b13af0
commit 24e531a16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -898,10 +898,14 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
if (!this.domain || !isComponentLoaded(this.hass, "diagnostics")) {
return;
}
this._diagnosticHandler = await fetchDiagnosticHandler(
this.hass,
this.domain
);
try {
this._diagnosticHandler = await fetchDiagnosticHandler(
this.hass,
this.domain
);
} catch (err: any) {
// No issue, as diagnostics are not required
}
}
private async _handleEnableDebugLogging() {