diff options
author | Torsten Grote <t@grobox.de> | 2023-01-18 13:07:28 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2023-01-18 13:07:28 -0300 |
commit | f426cb3760d54002a57725df31846d933ce1f35e (patch) | |
tree | cba7775fbb8ff46a3d00ef2149e49cfe57d955e0 /merchant-lib/src/main/java/net | |
parent | 1290c7fe549f39a7cf0faac20f6d6beaa714a603 (diff) | |
download | taler-android-f426cb3760d54002a57725df31846d933ce1f35e.tar.gz taler-android-f426cb3760d54002a57725df31846d933ce1f35e.tar.bz2 taler-android-f426cb3760d54002a57725df31846d933ce1f35e.zip |
[pos] Fix merchant-lib test case
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, ) } |