diff --git a/aws_adfs/_duo_authenticator.py b/aws_adfs/_duo_authenticator.py index 6c32bc2..0fdaf19 100644 --- a/aws_adfs/_duo_authenticator.py +++ b/aws_adfs/_duo_authenticator.py @@ -359,8 +359,10 @@ def _webauthn_get_assertion(device, webauthn_credential_request_options, duo_hos click.echo("Got response from FIDO U2F / FIDO2 authenticator: '{}'".format(device), err=True) rq.put(_submit_webauthn_response(duo_host, sid, webauthn_response, session, ssl_verification_enabled)) - except: - raise + except Exception as e: + logging.debug("Got an exception while waiting for {}: {}".format(device, e)) + if not cancel.is_set(): + raise finally: # Cancel the other FIDO U2F / FIDO2 prompts cancel.set() diff --git a/aws_adfs/_duo_universal_prompt_authenticator.py b/aws_adfs/_duo_universal_prompt_authenticator.py index 151b14f..c534b6b 100644 --- a/aws_adfs/_duo_universal_prompt_authenticator.py +++ b/aws_adfs/_duo_universal_prompt_authenticator.py @@ -364,8 +364,10 @@ def _webauthn_get_assertion( err=True, ) rq.put(_submit_webauthn_response(duo_host, sid, webauthn_response, session, ssl_verification_enabled)) - except: - raise + except Exception as e: + logging.debug("Got an exception while waiting for {}: {}".format(device, e)) + if not cancel.is_set(): + raise finally: # Cancel the other FIDO U2F / FIDO2 prompts cancel.set()