diff options
Diffstat (limited to 'merchant-lib/src/main/java/net')
-rw-r--r-- | merchant-lib/src/main/java/net/taler/merchantlib/Response.kt | 7 |
1 files changed, 2 insertions, 5 deletions
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<out T> private constructor( @@ -64,8 +62,7 @@ class Response<out T> 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<out T> private constructor( private class Error( val code: Int?, val hint: String?, - val detail: String?, + val detail: String? = null, ) } |