As stated above I'm having an issue in Flutter/Riverpod where account.get() throws an exception if the user is not logged in, which means my user auth state is either in Error or logged in, I would love a way to query for that info without the possibility of exception but
I have this provider for account.get() which returns an AppwriteException if they're not logged in
@Riverpod(keepAlive: true)
Future<User> authState(AuthStateRef ref) async {
return await ref.watch(appwriteAccountProvider).get();
}
I can't do anything about the exception I thought it would return an AsyncValue<User> so it would be an AsyncError How do I properly do this? maybe get rid of the await?
Didn't you have another thread on this topic?
Yeah sort of? I wanted to make a new thread because the title of the last one was a question and this one I meant to make more of a solution, I can delete this one though and edit the title if that's preferable, sorry about that
Ya probably best to continue the conversation in your existing post
Ill delete this
Recommended threads
- Export issue
I just hit my free appwrite limit (500k reads) I'm willing to switch to local db but I can't export the db data from console. I'm getting: 402 Database reads l...
- hey i reallly wanted to know can i make ...
hey i reallly wanted to know can i make a tree database like parent child thing or is it only tables
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...