
What is the best way to check if a user session exists? We are using the Web SDK and using either account.get()
or account.getSession('current')
however, when a user isn't logged in we get a 401 response which throws an error in the console.
is there a better way to be checking for user session?

account.get()
is the best way. if it executes successfully, they are logged in. Otherwise, check the error

Hey Steven! Thanks for the quick response. Will the error show in the console of the browser in production?
Recommended threads
- Network error when attempting to fetch r...
Hi, I am trying to modify some database data in the console for testing but keep getting this error. I am on the appwrite cloud and have already tried clearing ...
- Having errors migrating to cloud
Project will not migrate compeltely
- Appwrite realtime stopped working all of...
In our production environment, Appwrite Realtime suddenly stopped working and no updates are coming through , can you confirm if there are any known issues?
