Hi, I've got a basic user login and register system built with app write and I'd like to handle appwrite exceptions and show them in the front end (for example, user with that email already exists). What's the best way of doing this?
Currently, I call a function in a separate Appwrite function file for all my authentication stuff so how would I pass the data received in that back to the component / page?
I'm in React btw. Thank you.
the appwrite exception has a type. You can check that and then display whatever text you want. See https://appwrite.io/docs/advanced/platform/response-codes for more info
What's the best way of handling these? I've taken a look and they're not categorised at all, and I don't want to handle them all since I'm not using every bit of functionality from Appwrite.
the user related ones are prefixed with user_. try out to see what's thrown for the endpoint you're using. you can always take a look at the source code as well
Recommended threads
- 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 ...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- 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...