fix: issue in which users you are blocked by are not reportable
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
859e6c76c3
commit
4652bcf455
|
|
@ -152,7 +152,7 @@ suspend fun fetchUserProfile(id: String): Profile {
|
|||
|
||||
try {
|
||||
val error = RevoltJson.decodeFromString(RevoltError.serializer(), response)
|
||||
throw Error(error.type)
|
||||
throw Exception(error.type)
|
||||
} catch (e: SerializationException) {
|
||||
// Not an error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ fun UserInfoSheet(
|
|||
LaunchedEffect(user) {
|
||||
try {
|
||||
user?.id?.let { fetchUserProfile(it) }?.let { profile = it }
|
||||
} catch (e: Error) {
|
||||
} catch (e: Exception) {
|
||||
if (e.message == "NotFound") {
|
||||
profileNotFound = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue