gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: honor API docs


From: gnunet
Subject: [libeufin] branch master updated: honor API docs
Date: Fri, 13 Jan 2023 15:17:27 +0100

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 c6138ded honor API docs
c6138ded is described below

commit c6138dede6d35f6535035bfdba620ab48741112c
Author: MS <ms@taler.net>
AuthorDate: Fri Jan 13 15:15:21 2023 +0100

    honor API docs
    
    failed withdrawals due to insufficien funds
    are expected to respond "403 Forbidden"
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index e3a9d01d..d4b72bae 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -1304,7 +1304,7 @@ val sandboxApp: Application.() -> Unit = {
                     // Check funds are sufficient.
                     if (maybeDebit(maybeOwnedAccount.label, 
BigDecimal(amount.amount))) {
                         logger.error("Account ${maybeOwnedAccount.label} would 
surpass debit threshold.  Not withdrawing")
-                        throw SandboxError(HttpStatusCode.PreconditionFailed, 
"Insufficient funds")
+                        throw SandboxError(HttpStatusCode.Forbidden, 
"Insufficient funds")
                     }
                     val wo: TalerWithdrawalEntity = transaction {
                         TalerWithdrawalEntity.new {

-- 
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]