From 156ab8b16a7c4441e571e92dace749e8153b6c19 Mon Sep 17 00:00:00 2001 From: Infi Date: Tue, 25 Jun 2024 21:20:37 +0200 Subject: [PATCH] fix: throw Exception not Error Signed-off-by: Infi --- .../java/chat/revolt/api/routes/user/Relationships.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/chat/revolt/api/routes/user/Relationships.kt b/app/src/main/java/chat/revolt/api/routes/user/Relationships.kt index 618b3399..85991e85 100644 --- a/app/src/main/java/chat/revolt/api/routes/user/Relationships.kt +++ b/app/src/main/java/chat/revolt/api/routes/user/Relationships.kt @@ -18,7 +18,7 @@ suspend fun blockUser(userId: String) { try { val error = RevoltJson.decodeFromString(RevoltError.serializer(), response) - throw Error(error.type) + throw Exception(error.type) } catch (e: SerializationException) { // Not an error } @@ -30,7 +30,7 @@ suspend fun unblockUser(userId: String) { try { val error = RevoltJson.decodeFromString(RevoltError.serializer(), response) - throw Error(error.type) + throw Exception(error.type) } catch (e: SerializationException) { // Not an error } @@ -45,7 +45,7 @@ suspend fun friendUser(username: String) { try { val error = RevoltJson.decodeFromString(RevoltError.serializer(), body) - throw Error(error.type) + throw Exception(error.type) } catch (e: SerializationException) { // Not an error } @@ -57,7 +57,7 @@ suspend fun acceptFriendRequest(userId: String) { try { val error = RevoltJson.decodeFromString(RevoltError.serializer(), response) - throw Error(error.type) + throw Exception(error.type) } catch (e: SerializationException) { // Not an error } @@ -69,7 +69,7 @@ suspend fun unfriendUser(userId: String) { try { val error = RevoltJson.decodeFromString(RevoltError.serializer(), response) - throw Error(error.type) + throw Exception(error.type) } catch (e: SerializationException) { // Not an error }