Future<UserModel> getUserData(String uid) async { final document = await _userAPI.getUserData(uid); final updatedUser = UserModel.fromMap(document.data); return updatedUser; }
i am getting the following exception in the second line "Exception has occurred. AppwriteException (AppwriteException: document_not_found, Document with the requested ID could not be found. (404))"
seems document doesn't exits with given ID
is there any other way of getting current users uid
yap, if you account.get()
you will get users all the data including the ID
[SOLVED] getting exception
Recommended threads
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...
- Current User is Not authorized
recreating same Thread