You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firebase throws exceptions for many things, often as way of signalling something non-exceptional. We need a more robust strategy for handling these exceptions, particularly as different Firebase components use exceptions in different ways.
For example, FirebaseAuthException has a number of different subclasses for different exceptional events, whereas FIrebaseFirestoreException is a single class with an enum field to tell you what kind of exception it is.
A first sketch for the auth "module" (not actually a separate module yet) might be something like
The first typealias would be used in FirebaseAuthService and the second in ActualAuthWorkflow.
It's likely that we also need a strategy for sending notifications back up the workflow tree. For example, if an exception is thrown because the user has become unauthenticated, we need that to go all the way back up to the root workflow so the user can log back in.
An enhancement to this could be to include the state of each workflow on the way up the tree so that once the user logs in again they can be returned to wherever they were rather than manually navigating back.
The text was updated successfully, but these errors were encountered:
The first step to this is to stop using runSuspendCatching() and instead use an explicit try { } catch { } block. It's probably worth at least building something small to at least always rethrow CancellationException for coroutines.
Firebase throws exceptions for many things, often as way of signalling something non-exceptional. We need a more robust strategy for handling these exceptions, particularly as different Firebase components use exceptions in different ways.
For example, FirebaseAuthException has a number of different subclasses for different exceptional events, whereas FIrebaseFirestoreException is a single class with an enum field to tell you what kind of exception it is.
A first sketch for the auth "module" (not actually a separate module yet) might be something like
The first typealias would be used in
FirebaseAuthService
and the second inActualAuthWorkflow
.It's likely that we also need a strategy for sending notifications back up the workflow tree. For example, if an exception is thrown because the user has become unauthenticated, we need that to go all the way back up to the root workflow so the user can log back in.
An enhancement to this could be to include the state of each workflow on the way up the tree so that once the user logs in again they can be returned to wherever they were rather than manually navigating back.
The text was updated successfully, but these errors were encountered: