onAuthStateChange kezeletlen hiba módosítása, rögzítése

This commit is contained in:
2026-07-08 15:41:29 +02:00
parent f523053fb3
commit 7cd682fe59
2 changed files with 16 additions and 0 deletions
+12
View File
@@ -40,6 +40,18 @@ Future<void> main() async {
};
PlatformDispatcher.instance.onError = (error, stack) {
// A Supabase session-automata frissítése saját háttér-időzítővel fut;
// terepen, jel nélkül ez RENDSZERESEN SocketException/
// AuthRetryableFetchException-nel száll el — ez NEM app-összeomlás,
// a GoTrue a következő ciklusban magától újrapróbálja. A saját,
// explicit bejelentkezési hívásainkat már helyben elkapjuk
// (AuthService.signInWithGoogle), ezért ide csak ez az ártalmatlan,
// háttér-eredetű eset juthat el — nem fatal-ként rögzítjük, hogy ne
// torzítsa a crash-free arányt és ne riasszon feleslegesen.
if (error is AuthException) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: false);
return true;
}
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};