From f426cb3760d54002a57725df31846d933ce1f35e Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 18 Jan 2023 13:07:28 -0300 Subject: [pos] Fix merchant-lib test case --- merchant-lib/src/main/java/net/taler/merchantlib/Response.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'merchant-lib/src/main') diff --git a/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt b/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt index a5511f2..55de077 100644 --- a/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt +++ b/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt @@ -17,9 +17,7 @@ package net.taler.merchantlib import io.ktor.client.call.body -import io.ktor.client.plugins.ClientRequestException import io.ktor.client.plugins.ResponseException -import io.ktor.client.plugins.ServerResponseException import kotlinx.serialization.Serializable class Response private constructor( @@ -64,8 +62,7 @@ class Response private constructor( } private suspend fun getFailureString(failure: Failure): String = when (failure.exception) { - is ClientRequestException -> getExceptionString(failure.exception) - is ServerResponseException -> getExceptionString(failure.exception) + is ResponseException -> getExceptionString(failure.exception) else -> failure.exception.toString() } @@ -85,6 +82,6 @@ class Response private constructor( private class Error( val code: Int?, val hint: String?, - val detail: String?, + val detail: String? = null, ) } -- cgit v1.2.3