In this function, is there a way to check that there's an account connected before calling account.get(), or maybe mute the console.error from Appwrite in prod ? Because I get a 401 error in my console when not connected.
export async function getUser() { try {
return await account.get();
} catch (error) {
console.log("Get user failed : user probably not logged in");
return null;
}
}
I try adding this but I get a new scope error:
const session = await account.getSession('current'); if (!session) { console.log("No active session found"); return null; } I tried some jwt token shenanigan but still i get an error
I need this to get to 100 in my best practice lighthouse test
Recommended threads
- unlike any other provider, your sites DN...
your nameservers dont work with a funny little CNAME error, which is a weird bug but thats what you get when you try to be the kitchen sink, funny errors.
- general_unauthorized_scope
localhost oauth not working. general_unauthorized_scope error showing. { "message": "User (role: guests) missing scopes ([\"account\"])", "code": 401, ...
- Weird Table Causes Console to break
I dont even know how this even happened looks like the $createdAt and , $id got switched? <@831428608895615056>