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
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126