Skip to content

Commit 69cf560

Browse files
committed
chore: fix failing test
1 parent f988e20 commit 69cf560

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Models/AWSAuthCognitoSession.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ public struct AWSAuthCognitoSession: AuthSession,
6464
return .failure(AuthError.signedOut(
6565
AuthPluginErrorConstants.userSubSignOutError.errorDescription,
6666
AuthPluginErrorConstants.userSubSignOutError.recoverySuggestion))
67+
} catch let error as AuthError {
68+
return .failure(error)
6769
} catch {
68-
return .failure(error as AuthError)
70+
let error = AuthError.unknown("""
71+
Could not retreive user sub from the fetched Cognito tokens.
72+
""")
73+
return .failure(error)
6974
}
7075
}
7176

0 commit comments

Comments
 (0)