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
- Paused project can't activate
I have failed to reactivate one my projects which had been paused
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...