
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
- can't send emails
i explored the docs and it says Messaging.CreateEmail() but this function does not exist , i installed appwrite on next js env everything works fine except thi...
- Messaging via Resend: "to": "\"undisclos...
I'm using the node-appwrite@18.0.0 SDK. ``` await messaging.createEmail({ messageId: ID.unique(), subject: "Subject", content: `htmlCont...
- Internal 500 Server Error
I don't have much information but I am unable to create anything on database, Auth users are creating but not able to fetch into database
