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?
TL;DR
Developers are asking for a way to check if a user session exists without getting a 401 response error in the console. The best method suggested is to use `account.get()` - if it executes successfully, the user is logged in; otherwise, check the error.