diff options
author | Torsten Grote <t@grobox.de> | 2020-08-26 10:06:03 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-08-26 10:06:03 -0300 |
commit | ed3f86481a71517e7bf6ffa46dc8d160b508ec38 (patch) | |
tree | ba91d81d539783297ac826a816bf6bb82765bc63 /wallet/src/main/java | |
parent | c8dbdaf02d200287cc1242f4826a6c9637398640 (diff) | |
download | taler-android-ed3f86481a71517e7bf6ffa46dc8d160b508ec38.tar.gz taler-android-ed3f86481a71517e7bf6ffa46dc8d160b508ec38.tar.bz2 taler-android-ed3f86481a71517e7bf6ffa46dc8d160b508ec38.zip |
[wallet] include JSON error details in user-facing error message
ugly, but helps with debugging
Diffstat (limited to 'wallet/src/main/java')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt b/wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt index 4b39ff8..5826997 100644 --- a/wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt +++ b/wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt @@ -76,12 +76,11 @@ data class WalletErrorInfo( append(" ") append(message) details?.let { details -> + append("\n\n") details.optJSONObject("errorResponse")?.let { errorResponse -> - append("\n\n") - append(errorResponse.optString("code")) - append(" ") + append(errorResponse.optString("code")).append(" ") append(errorResponse.optString("hint")) - } + } ?: append(details.toString(2)) } }.toString() } |