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
- Appwrite Sites: ERR_TOO_MANY_REDIRECTS o...
So, my domain was working perfectly fine with Vercel. I was using cloudflare CDN (still am) but CNAME was DNS-only. I switched over to appwrite, CNAME is still ...
- Project restoration button in console
The project restore button in console is taking no effect, i have tried several times and still nothing, it gives same popup if i reload
- 1.9.5 Migration problem
1.9.5 migration problem after run migration command only openruntimes-executor