From 2dedc30358d1724f60ab646b7a24e93f3672dff1 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 22 Sep 2026 13:03:36 +0800 Subject: Debit available cash on manual stock and bond buys with ledger events (3d-34) --- src/FundLab.Api/App.fs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/FundLab.Api/App.fs') diff --git a/src/FundLab.Api/App.fs b/src/FundLab.Api/App.fs index c14ab66..4facf2b 100644 --- a/src/FundLab.Api/App.fs +++ b/src/FundLab.Api/App.fs @@ -2863,6 +2863,8 @@ module App = return! invokeHandler (errorResponse 400 "INVALID_BOND_TRADE_REQUEST" message) next ctx | BondTradeWriteResult.BondTradeFundNotFound -> return! invokeHandler (errorResponse 404 "FUND_NOT_FOUND" "fund was not found") next ctx + | BondTradeWriteResult.BondTradeInsufficientFunds message -> + return! invokeHandler (errorResponse 400 "INSUFFICIENT_FUNDS" message) next ctx with _ -> return! invokeHandler (errorResponse 500 "PERSISTENCE_ERROR" "bond trade persistence failed") next ctx } -- cgit v1.2.3