Skip to content

Commit

Permalink
chore: rename EnableSoftwareTokenMfaException to `CodeMismatchExcep…
Browse files Browse the repository at this point in the history
…tion`
  • Loading branch information
Jordan-Nelson committed Apr 24, 2024
1 parent 3f8bea1 commit c99eb94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void main() {
check(
e,
because: 'Invalid TOTP code should fail verification',
).isA<EnableSoftwareTokenMfaException>();
).isA<CodeMismatchException>();
}

check(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,7 @@ class AmplifyAuthCognitoDart extends AuthPluginInterface

switch (state) {
case TotpSetupRequiresVerification _:
// TODO(equartey): Change to `CodeMismatchException` in next major version as breaking change
throw const EnableSoftwareTokenMfaException(
throw const CodeMismatchException(
'The code provided was incorrect, try again',
);
case TotpSetupFailure(:final exception, :final stackTrace):
Expand Down

0 comments on commit c99eb94

Please sign in to comment.