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 -> {