From 15c3509b8a07f3a02eb6d1cd6bf549252e3343b4 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Tue, 27 Feb 2024 19:04:14 +0100 Subject: [PATCH] Ignore error on cancelling adding mfa device. --- src/components/mfaDevices/mfaDevices.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/mfaDevices/mfaDevices.js b/src/components/mfaDevices/mfaDevices.js index 0415d6e..ead2788 100644 --- a/src/components/mfaDevices/mfaDevices.js +++ b/src/components/mfaDevices/mfaDevices.js @@ -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;