From 3383aa3e7cb39a53203a8d0ad372097060e91d69 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Tue, 17 Jan 2023 14:45:11 -0300 Subject: [pos] include error detail in error string --- merchant-lib/src/main/java/net/taler/merchantlib/Response.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'merchant-lib/src') 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 b7ba1ac..a5511f2 100644 --- a/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt +++ b/merchant-lib/src/main/java/net/taler/merchantlib/Response.kt @@ -73,7 +73,7 @@ class Response private constructor( val response = e.response return try { val error: Error = response.body() - "Error ${error.code}: ${error.hint}" + "Error ${error.code} (${response.status.value}): ${error.hint} ${error.detail}" } catch (ex: Exception) { "Status code: ${response.status.value}" } @@ -84,6 +84,7 @@ class Response private constructor( @Serializable private class Error( val code: Int?, - val hint: String? + val hint: String?, + val detail: String?, ) } -- cgit v1.2.3