Error thrown when initiating an MFA challenge fails.
Example
try { awaitmfa.challenge({ mfaToken, challengeType:'oob', authenticatorId:'sms|dev_abc123' }); } catch (error) { if (errorinstanceofMfaChallengeError) { if (error.cause?.error === 'invalid_authenticator_id') { console.error('Authenticator not found or not active'); } } }
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 initiating an MFA challenge fails.
Example