From ed3f86481a71517e7bf6ffa46dc8d160b508ec38 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 26 Aug 2020 10:06:03 -0300 Subject: [wallet] include JSON error details in user-facing error message ugly, but helps with debugging --- wallet/src/main/java/net/taler/wallet/backend/WalletResponse.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'wallet/src/main/java') 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() } -- cgit v1.2.3