Skip to content

Commit d76f9fc

Browse files
committed
Gemini recommendation: use reportError inside the catch block
1 parent 0782ea6 commit d76f9fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/PasswordRecoveryView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import SwiftUI
1919
@MainActor
2020
public struct PasswordRecoveryView {
2121
@Environment(AuthService.self) private var authService
22+
@Environment(\.reportError) private var reportError
2223
@State private var email = ""
2324
@State private var showSuccessSheet = false
2425
@State private var sentEmail = ""
@@ -31,7 +32,7 @@ public struct PasswordRecoveryView {
3132
sentEmail = email
3233
showSuccessSheet = true
3334
} catch {
34-
// Error already displayed via modal by AuthService
35+
reportError?(error)
3536
}
3637
}
3738
}

0 commit comments

Comments
 (0)