fix: issue in which users you are blocked by are not reportable

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-02-19 00:26:23 +01:00
parent 859e6c76c3
commit 4652bcf455
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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
}