When I auth the user and a session is already initialized, I get this response in the console
{
"message": "Creation of a session is prohibited when a session is active.",
"code": 401,
"type": "user_session_already_exists",
"version": "1.5.7"
}
But when I console.log the response, it doesn't log. How am I supposed to handle the issue if I cannot get the error why the session can't start?
let session = await appwrite.account.createEmailPasswordSession(username, password);
console.log("session", session)
session.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
let promise = appwrite.account.createEmailPasswordSession(username, password);
promise.then(function (response) {
console.log("response", response); // Success
}, function (error) {
console.log("error", error); // Failure
});
The error codes etc isn't printed, I'm looking to get the response
it means you are already logged in, you have to be log out to login again
I know, but I want to handle the error
I want to get the response code ”type”
Im only getting the message
Recommended threads
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- CORS errors in Obsidian custom plugin
Hi, anyone here familiar with obsidian community plugins? In short: it's a local first note app which supports writing your own add-ons / plugin But I keep get...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...