From 47f4b77f53c7955e96d9198797ce58def34c0ff5 Mon Sep 17 00:00:00 2001 From: Alex Sokol / y9san9 Date: Wed, 1 Nov 2023 09:24:15 +0300 Subject: [PATCH] fix: exceptions handling --- .../kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt index 6f942b8..ba6b903 100644 --- a/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt +++ b/api/api-ktor/src/commonMain/kotlin/app/meetacy/sdk/engine/ktor/KtorMeetacyEngine.kt @@ -119,7 +119,7 @@ public class KtorMeetacyEngine( block() } catch (exception: ResponseException) { val response = try { - json.decodeFromString(exception.response.body()) + json.decodeFromString>(exception.response.body()) as ServerResponse.Error } catch (exception: Throwable) { throw MeetacyInternalException(cause = exception) }