gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: logging


From: gnunet
Subject: [libeufin] branch master updated: logging
Date: Tue, 04 Apr 2023 13:56:43 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new d75824cd logging
d75824cd is described below

commit d75824cd235b81680ca9e38ad9e6bebb3e3a1010
Author: MS <ms@taler.net>
AuthorDate: Tue Apr 4 13:56:34 2023 +0200

    logging
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt | 5 ++++-
 util/src/main/kotlin/strings.kt                             | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
index 773d6450..d66aa83e 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
@@ -443,6 +443,7 @@ fun circuitApi(circuitRoute: Route) {
             val amount_credit = "$FIAT_CURRENCY:$respAmountCredit"
             val amount_debit = "${demobank.config.currency}:$respAmountDebit"
         })
+        return@get
     }
 
     // Create a cash-out operation.
@@ -804,11 +805,13 @@ fun circuitApi(circuitRoute: Route) {
             withBankFault = true // See comment "CUSTOMER AND BANK ACCOUNT 
INVARIANT".
         )
         val balance = getBalance(bankAccount)
-        if (balance != BigDecimal.ZERO)
+        if (balance != BigDecimal.ZERO) {
+            logger.error("Account $resourceName has $balance balance.  Won't 
delete it")
             throw SandboxError(
                 HttpStatusCode.PreconditionFailed,
                 "Account $resourceName doesn't have zero balance.  Won't 
delete it"
             )
+        }
         transaction {
             bankAccount.delete()
             customer.delete()
diff --git a/util/src/main/kotlin/strings.kt b/util/src/main/kotlin/strings.kt
index 0698d308..19e1a927 100644
--- a/util/src/main/kotlin/strings.kt
+++ b/util/src/main/kotlin/strings.kt
@@ -186,7 +186,7 @@ fun parseUuid(maybeUuid: String): UUID {
     val uuid = try {
         UUID.fromString(maybeUuid)
     } catch (e: Exception) {
-        throw badRequest("$maybeUuid is an invalid UUID.")
+        throw badRequest("'$maybeUuid' is an invalid UUID.")
     }
     return uuid
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]