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 {
|
try {
|
||||||
val error = RevoltJson.decodeFromString(RevoltError.serializer(), response)
|
val error = RevoltJson.decodeFromString(RevoltError.serializer(), response)
|
||||||
throw Error(error.type)
|
throw Exception(error.type)
|
||||||
} catch (e: SerializationException) {
|
} catch (e: SerializationException) {
|
||||||
// Not an error
|
// Not an error
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ fun UserInfoSheet(
|
||||||
LaunchedEffect(user) {
|
LaunchedEffect(user) {
|
||||||
try {
|
try {
|
||||||
user?.id?.let { fetchUserProfile(it) }?.let { profile = it }
|
user?.id?.let { fetchUserProfile(it) }?.let { profile = it }
|
||||||
} catch (e: Error) {
|
} catch (e: Exception) {
|
||||||
if (e.message == "NotFound") {
|
if (e.message == "NotFound") {
|
||||||
profileNotFound = true
|
profileNotFound = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue