Show proper error message if username already used (#7866)

This commit is contained in:
Philip Allgaier 2020-12-02 15:35:38 +01:00 committed by GitHub
parent ca7b8b8b4c
commit faaef31b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,7 @@ export class DialogAddUser extends LitElement {
user = userResponse.user; user = userResponse.user;
} catch (err) { } catch (err) {
this._loading = false; this._loading = false;
this._error = err.code; this._error = err.message;
return; return;
} }
@ -255,7 +255,7 @@ export class DialogAddUser extends LitElement {
} catch (err) { } catch (err) {
await deleteUser(this.hass, user.id); await deleteUser(this.hass, user.id);
this._loading = false; this._loading = false;
this._error = err.code; this._error = err.message;
return; return;
} }