#account.get() takes too much time to give response in android studio.
11 messages · Page 1 of 1 (latest)
Can you show your code?
What version of Appwrite?
It's possible that Appwrite Cloud is undergoing it's daily backup, which might be causing the issue
i am using appwrite cloud
this is my code
suspend fun getUser(): Resource<User<Map<String,Any>>?> {
return withContext(Dispatchers.IO) {
try {
val response = account.get()
Resource.Success(response)
}catch (e:AppwriteException){
if(e.type.equals("general_unauthorized_scope")){
Resource.Success(null)
}else{
Resource.Error(e.message ?: "An error occurred")
}
}
catch (e: Exception) {
Resource.Error(e.message ?: "An error occurred")
}
}
}
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
Are you connecting to Appwrite cloud? If so, where are you located?
How long is too long? Maybe you can log the time before and after the request?
how will i know cloud location ?
im asking you where you are located. Appwrite Cloud is currently in frankfurt
India