Skip to content

Commit 447f529

Browse files
committed
chore: Fix error messages
1 parent 03b72e9 commit 447f529

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Task/VerifyTOTPSetupTask.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,19 @@ class VerifyTOTPSetupTask: AuthVerifyTOTPSetupTask, DefaultLogger {
5858
let result = try await userPoolService.verifySoftwareToken(input: input)
5959

6060
guard let output = result.status else {
61-
throw AuthError.service("Result cannot be retrieved", "")
61+
throw AuthError.service("Verify TOTP Result cannot be retrieved", AmplifyErrorMessages.shouldNotHappenReportBugToAWS())
6262
}
6363

6464
switch output {
6565
case .error:
66-
throw AuthError.service("Unknown error", "")
66+
throw AuthError.service("Unknown service error occurred",
67+
AmplifyErrorMessages.reportBugToAWS())
6768
case .success:
6869
return
6970
case .sdkUnknown(let error):
70-
throw AuthError.service("Unknown error", error)
71+
throw AuthError.service(
72+
error,
73+
AmplifyErrorMessages.reportBugToAWS())
7174
}
7275

7376
}

0 commit comments

Comments
 (0)