Back

[SOLVED] getting exception

  • 1
  • Flutter
Ansh
19 May, 2023, 10:19

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))"

TL;DR
The user is encountering an exception while trying to retrieve data with the given ID. The exception message is "Document with the requested ID could not be found." The issue has been resolved. Solution: Check if the document exists with the given ID. Make sure the ID is correct and corresponds to an existing document.
Vedsaga
19 May, 2023, 10:28

seems document doesn't exits with given ID

Ansh
19 May, 2023, 10:30

is there any other way of getting current users uid

Vedsaga
19 May, 2023, 10:32

yap, if you account.get()

Vedsaga
19 May, 2023, 10:32

you will get users all the data including the ID

Drake
19 May, 2023, 15:28

[SOLVED] getting exception

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more