summaryrefslogtreecommitdiff
path: root/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
diff options
context:
space:
mode:
authorAntoine A <>2024-03-12 23:03:02 +0100
committerAntoine A <>2024-03-13 21:19:30 +0100
commit651217a5c089bd20d94f9b4760e13f491bc26861 (patch)
tree4a8168faeba67b6bf5402edbbc288ad7c129640e /nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
parentcd6421f1c45e1a51415c19c1e28eed8a91c56008 (diff)
downloadlibeufin-651217a5c089bd20d94f9b4760e13f491bc26861.tar.gz
libeufin-651217a5c089bd20d94f9b4760e13f491bc26861.tar.bz2
libeufin-651217a5c089bd20d94f9b4760e13f491bc26861.zip
Improve submission order to guarantee progress and improve testbench
Diffstat (limited to 'nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
index 765037e4..47c021cd 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
@@ -132,9 +132,9 @@ suspend fun ingestIncomingPayment(
Instant.now()
)
if (result.new) {
- logger.info("$payment bounced in '${result.bounceId}': ${e.message}")
+ logger.info("$payment bounced in '${result.bounceId}': ${e.fmt()}")
} else {
- logger.debug("$payment already seen and bounced in '${result.bounceId}': ${e.message}")
+ logger.debug("$payment already seen and bounced in '${result.bounceId}': ${e.fmt()}")
}
}
)
@@ -154,7 +154,7 @@ private suspend fun ingestDocument(
is TxNotification.Incoming -> ingestIncomingPayment(db, it.payment)
is TxNotification.Outgoing -> ingestOutgoingPayment(db, it.payment)
is TxNotification.Reversal -> {
- logger.warn("BOUNCE '${it.msgId}': ${it.reason}")
+ logger.error("BOUNCE '${it.msgId}': ${it.reason}")
db.initiated.reversal(it.msgId, "Payment bounced: ${it.reason}")
}
}
@@ -176,7 +176,7 @@ private suspend fun ingestDocument(
HacAction.ORDER_HAC_FINAL_NEG -> {
logger.debug("$ack")
db.initiated.logFailure(ack.orderId!!)?.let { (requestUID, msg) ->
- logger.warn("Payment '$requestUID' refused at ${ack.timestamp.fmtDateTime()}${if (msg != null) ": $msg" else ""}")
+ logger.error("Payment '$requestUID' refused at ${ack.timestamp.fmtDateTime()}${if (msg != null) ": $msg" else ""}")
}
}
else -> {
@@ -194,7 +194,7 @@ private suspend fun ingestDocument(
logger.debug("$status")
if (status.paymentCode == ExternalPaymentGroupStatusCode.RJCT) {
db.initiated.bankFailure(status.msgId, msg)
- logger.warn("Transaction '${status.msgId}' was rejected : $msg")
+ logger.error("Transaction '${status.msgId}' was rejected : $msg")
} else {
db.initiated.bankMessage(status.msgId, msg)
}