From a468dabbfdeadfc3cbeac55f67f0a626590ad7c0 Mon Sep 17 00:00:00 2001 From: Alex Sokol / y9san9 Date: Wed, 1 Nov 2023 12:27:16 +0300 Subject: [PATCH] fix: rsocket serialization --- .../commonMain/kotlin/app/meetacy/sdk/engine/ktor/RSocket.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/RSocket.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/RSocket.kt index ae2c80f..6bcd740 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/RSocket.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/RSocket.kt @@ -23,9 +23,9 @@ internal inline fun handleRSocketExceptions( } catch (exception: RSocketError) { when (exception) { is RSocketError.Custom -> { - val response = json.decodeFromString( + val response = json.decodeFromString>( string = exception.message ?: meetacyApiError(message = "Message should be present when throwing custom error") - ) + ) as ServerResponse.Error throw getException(response) } else -> {