Error thrown when listing MFA authenticators fails.
try { const authenticators = await mfa.getAuthenticators({ mfaToken });} catch (error) { if (error instanceof MfaGetAuthenticatorsError) { console.error(error.code); // 'invalid_token', 'expired_token', etc. console.error(error.cause?.error_description); }} Copy
try { const authenticators = await mfa.getAuthenticators({ mfaToken });} catch (error) { if (error instanceof MfaGetAuthenticatorsError) { console.error(error.code); // 'invalid_token', 'expired_token', etc. console.error(error.cause?.error_description); }}
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 listing MFA authenticators fails.
Example