libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit c6138dede6d35f6535035bfdba620ab48741112c
parent 4acefbd1c6bcf1313be312851abe5a4ecf3f178f
Author: MS <ms@taler.net>
Date:   Fri, 13 Jan 2023 15:15:21 +0100

honor API docs

failed withdrawals due to insufficien funds
are expected to respond "403 Forbidden"

Diffstat:
Msandbox/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 @@ -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 {