Rank 3: Container
On page load I check if the user is logged in and then store that account information to a global state. The documentation says the account.get() call throws an AppwriteException so I wrap it in a try catch block but it still shows on the dev tools:
try { const userSession = await account.get();
if (userSession) { setSession(userSession); }} catch (error: any) { // AppwriteException: User (role: guests) missing scope (account) // User is not logged in - do nothing}Even though I wrapped this in a try catch block, I still get GET https://appwrite.mydomain.com/v1/account 401 on the dev tools. I know it is harmless but is it possible to not have that show up on the dev tools? Would it be possible to set these async calls so that you can destructure the data returned or the error if an error does occur:
const { data: userSession, error } = await account.get();