commit 09f8c0632548ab365ecb0b06ce9d50ea50b1e4e0
parent 9adbdbe59b7a865fa61881ba4a3c60f847bfa413
Author: MS <ms@taler.net>
Date: Wed, 7 Jun 2023 11:53:13 +0200
/admin/add-incoming
When proxying to Sandbox fails, Nexus fails as well.
Diffstat:
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt
@@ -568,7 +568,7 @@ private suspend fun historyIncoming(call: ApplicationCall) {
/**
* This call proxies /admin/add/incoming to the Sandbox,
- * which is the service keeping the transactions ledger.
+ * which is the service keeping the transaction ledger.
* The credentials are ASSUMED to be exchange/x (user/pass).
*
* In the future, a dedicated "add-incoming" facade should
@@ -613,16 +613,11 @@ private suspend fun addIncoming(call: ApplicationCall) {
)
}
val client = HttpClient { followRedirects = true }
- try {
- client.post(fromDb.first) {
- setBody(currentBody)
- basicAuth("exchange", "x")
- contentType(ContentType.Application.Json)
- }
- } catch (e: ClientRequestException) {
- logger.error("Proxying /admin/add/incoming to the Sandbox failed: $e")
- } catch (e: Exception) {
- logger.error("Could not proxy /admin/add/incoming to the Sandbox: $e")
+ client.post(fromDb.first) {
+ setBody(currentBody)
+ basicAuth("exchange", "x")
+ contentType(ContentType.Application.Json)
+ expectSuccess = true
}
/**
* At this point, Sandbox booked the payment. Now the "row_id"