fix: throw Exception not Error
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
918f25e0ac
commit
e84edc2122
|
|
@ -67,7 +67,7 @@ suspend fun fetchMember(serverId: String, userId: String, pure: Boolean = false)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val error = RevoltJson.decodeFromString(RevoltError.serializer(), response.bodyAsText())
|
val error = RevoltJson.decodeFromString(RevoltError.serializer(), response.bodyAsText())
|
||||||
throw Error(error.type)
|
throw Exception(error.type)
|
||||||
} catch (e: SerializationException) {
|
} catch (e: SerializationException) {
|
||||||
// Not an error
|
// Not an error
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue