Error thrown when MFA enrollment fails.
try { await mfa.enroll({ mfaToken, authenticatorTypes: ['otp'] });} catch (error) { if (error instanceof MfaEnrollmentError) { if (error.cause?.error === 'unsupported_challenge_type') { console.error('Tenant does not support OTP enrollment'); } }} Copy
try { await mfa.enroll({ mfaToken, authenticatorTypes: ['otp'] });} catch (error) { if (error instanceof MfaEnrollmentError) { if (error.cause?.error === 'unsupported_challenge_type') { console.error('Tenant does not support OTP enrollment'); } }}
Optional
Readonly
Serialize error for HTTP responses. Called automatically by Response.json() and JSON.stringify(). Ensures both SDK and HTTP API consumers get identical shape.
Error thrown when MFA enrollment fails.
Example