commit cdf5a033bb8705d3bcdf470cd66b41e5091e9c68
parent de7e5a9726a29a39b801cf0a2b1e708c36f7f2aa
Author: Antoine A <>
Date: Tue, 14 Nov 2023 10:20:35 +0000
Improve cashout API
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt
@@ -552,7 +552,8 @@ private fun Routing.coreBankCashoutApi(db: Database, ctx: BankConfig) = conditio
process.exitValue()
}
if (exitValue != 0) {
- throw conflict(
+ throw libeufinError(
+ HttpStatusCode.BadGateway,
"Tan channel script failure with exit value $exitValue",
TalerErrorCode.BANK_TAN_CHANNEL_SCRIPT_FAILED
)
diff --git a/bank/src/test/kotlin/CoreBankApiTest.kt b/bank/src/test/kotlin/CoreBankApiTest.kt
@@ -1073,7 +1073,7 @@ class CoreBankCashoutApiTest {
jsonBody(req) {
"tan_channel" to "email"
}
- }.assertConflict(TalerErrorCode.BANK_TAN_CHANNEL_SCRIPT_FAILED)
+ }.assertStatus(HttpStatusCode.BadGateway, TalerErrorCode.BANK_TAN_CHANNEL_SCRIPT_FAILED)
// Check OK
client.post("/accounts/customer/cashouts") {