
Api errors keeps appearing even when I wrap the methods call with a try/catch
The API error on the image appears when I run the following code
try {
const session = await auth.getSession('current');
sessionId = session.$id;
} catch (error) {
initializerClientError = error;
}
Is there a way to avoid this messages at all? or to check if a session exists in a way that do not throw an error?

Avoid console error messages

You mean the error being shown to the user?

If so, you could customise them client sided after getting the error

You can do a condition/switch and depending on the appwrite error message you show your own error message

@D5 I mean the error that appears on the console. I can't avoid it even with the try/catch

Supposedly that should not be seen by anyone

yup nothing you can do about that. any non 400 and above http status response will show up here
Recommended threads
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attribute stuck on proccessing
i tried creating a new attribute butits stuck on proccessing,i did a hard refresh,cleared cache everything but still stuck on proccessing,also in my functions w...
- Appwrite Cloud Custom Domains Issue
I’m trying to configure my custom domain appwrite.qnarweb.com (CNAME pointing to fra.cloud.appwrite.io with Cloudflare proxy disabled) but encountering a TLS ce...
