When you enter a bad MFA we're getting a 404 for resp.status but the parsing of the error code isn't correct
It appears this code block is incorrect:
And we need to raise an MFA exception instead of an "Unknown error"
aka:
Maybe something like:
if response["detail"] == 'Your code was invalid, please try again or use a recovery token.':
raise RequireMFAException("Your code was invalid, please try again or use a recovery token")
or
if 'please try again' in response['detail']:
raise RequireMFAException("Your code was invalid, please try again or use a recovery token")
When you enter a bad MFA we're getting a
404
forresp.status
but the parsing of the error code isn't correctIt appears this code block is incorrect:
And we need to raise an MFA exception instead of an "Unknown error"
aka:
Maybe something like:
or