
Hey guys,
Sorry to bother you. I'm wondering why does this keep showing up in the console?
I do have error catching at each place I am using the account.get()
and other than that everything works. Logging in, out & register.
I'd just like to be able to resolve those initial XHR error lines in the console that show up despite me catching the actual error with the message and all prior. The 401 is just an example. It happens for pretty much all errors. I always have this initial line and then the actual error if I don't catch it.
A sample of my code:
import { Client, Account } from 'appwrite';
const API_ENDPOINT = 'https://cloud.appwrite.io/v1';
const PROJECT_ID = import.meta.env.VITE_APPWRITE_PROJECT_ID;
const client = new Client();
client
.setEndpoint(API_ENDPOINT)
.setProject(PROJECT_ID);
export const account = new Account(client);
export default client;
const checkUserStatus = async () => {
try {
const accountDetails = await account.get();
setUser(accountDetails);
} catch (error) {
console.log(error)
setUser(null);
}
setLoading(false);
};
Best Regards!

Not a bother at all! This is why this discord server exists!
This is just how the browser works. It'll log any unsuccessful API call (any http request that has a status code of 400 or more)

And im assuming you mean the browser console log shows something like:

Hey, Steven.
Yeah precisely that. I noticed a post online talking about it, but I couldn't find other sources to confirm.
Thanks for the clarification. Much appreciated. 🙂
Have a good one!

[SOLVED] GET https://cloud.appwrite.io/v1/account 401 (Unauthorized)
Recommended threads
- The new Bulk API and Realtime updates
It seems that the new Bulk API doesn't actually send realtime updates which is making a huge problem for me. I also wanted to know different is it deleting mul...
- Which repo is used for cloud.appwrite.io...
I made a PR and it got merged into appwrite/console Repo. - It had this description: "The console that makes Appwrite tick from the browser" - I assumed this i...
- Send Team Invites w/o Owner Role
Hi there! I'm trying to get a specific bit of functionality set up in my application. I would like to be able to allow users to send Team Invite emails to oth...
