Error thrown when getting enrollment factors fails.
try { const factors = await mfa.getEnrollmentFactors(mfaToken);} catch (error) { if (error instanceof MfaEnrollmentFactorsError) { console.log(error.error); // 'mfa_context_not_found' console.log(error.error_description); // 'MFA context not found...' }} Copy
try { const factors = await mfa.getEnrollmentFactors(mfaToken);} catch (error) { if (error instanceof MfaEnrollmentFactorsError) { console.log(error.error); // 'mfa_context_not_found' console.log(error.error_description); // 'MFA context not found...' }}
Optional
Any other fields from the server's error response (for example auth_session).
auth_session
The error code from the server response.
error
The error_description from the server response.
error_description
Static
Error thrown when getting enrollment factors fails.
Example