Skip to content

Commit

Permalink
Always request update on error or state change.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Feb 27, 2024
1 parent 15c3509 commit b45d051
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/mfaDevices/mfaDevices.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,20 @@ export default class MfaDevices extends LitElement {
logger.log('Failed to register new device because it is not supported', error);
this.state = states.NEW;
this.error = 'This device no longer supports security devices.';
this.requestUpdate();
return;
}

// The operation was cancelled, just ignore the error;
if (error.message && error.message.match('The operation either timed out or was not allowed')) {
this.state = states.NEW;
this.error = null;
this.requestUpdate();
return;
}
logger.error('Failed to register new device', error);
this.error = error.message || error.data && (error.data.title || error.data.errorCode);
this.state = states.NEW;
this.error = error.message || error.data && (error.data.title || error.data.errorCode);
}

this.requestUpdate();
Expand Down

0 comments on commit b45d051

Please sign in to comment.