Class: MFAVerificationError
Defined in: src/auth/errors.ts:163
MFA verification error.
Remarks
Thrown when MFA verification fails. HTTP mapping: 401 Unauthorized
Extends
Constructors
new MFAVerificationError()
new MFAVerificationError(
method,message,attemptsRemaining?):MFAVerificationError
Defined in: src/auth/errors.ts:183
Creates a new MFAVerificationError.
Parameters
method
string
MFA method that failed
message
string
Error message
attemptsRemaining?
number
Remaining attempts
Returns
Overrides
Properties
attemptsRemaining?
readonlyoptionalattemptsRemaining:number
Defined in: src/auth/errors.ts:174
Remaining attempts before lockout.
cause?
readonlyoptionalcause:Error
Defined in: src/types/errors.ts:71
Original error that caused this error (if any).
Remarks
Error chaining allows tracking the full error context through multiple layers of the application. Useful for debugging complex error scenarios.
Example
try {
await fetchData();
} catch (err) {
throw new ValidationError('Failed to validate data', 'field', 'required', err as Error);
}
Inherited from
code
readonlycode:"MFA_VERIFICATION_FAILED"='MFA_VERIFICATION_FAILED'
Defined in: src/auth/errors.ts:164
Machine-readable error code.
Remarks
Error codes are unique identifiers for error types, enabling programmatic error handling (switch statements, error maps), error tracking in monitoring systems, and client-side error translation (i18n).
Overrides
method
readonlymethod:string
Defined in: src/auth/errors.ts:169
MFA method that failed.