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
- AstroJS Not Listed as a Web Framework Op...
Hey folks, as a followup to this post https://discord.com/channels/564160730845151244/1102936099745177700/1440603125642952734 I was trying to see if there was a...
- Database table mysteriously empty this m...
Hello, I'm testing out appwrite (free) with a simple vue app. This morning a I created a few indexes on a table, and then noticed that it was empty... I don't e...
- Issue: Getting 401 Unauthorized Error Wh...
Hi team, I'm encountering a 401 user_unauthorized error when trying to create a row in my projects table, even though I have full user permissions configured fo...