Skip to content

Commit

Permalink
Ignore error on cancelling adding mfa device.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Feb 27, 2024
1 parent 1fcfff5 commit 15c3509
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/mfaDevices/mfaDevices.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export default class MfaDevices extends LitElement {
this.error = 'This device no longer supports security devices.';
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;
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;
Expand Down

0 comments on commit 15c3509

Please sign in to comment.