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
- Google Auth not working in a React App
Authentication with Google has failed. It redirects back to the signin route in React. Attached screenshots for configuration of Google console and Appwrite Go...
- Dokploy docker compose
Hey guys hope y'all doing well, I was wondering if anyone could share a working 1.8.0 docker-compose that works with Dokploy I tried making it but it just does...
- i need help!
I was working on my project and I just can't stop receiving this message. Is something wrong?