[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 01/02: logging.
From: |
gnunet |
Subject: |
[libeufin] 01/02: logging. |
Date: |
Wed, 15 Feb 2023 15:57:59 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 97ab4b906bcf280790527f3c101933592fc33a56
Author: MS <ms@taler.net>
AuthorDate: Wed Feb 15 15:42:56 2023 +0100
logging.
Avoid logging EBICS-ReportText when a bank-technical
error happens.
---
.../tech/libeufin/nexus/ebics/EbicsClient.kt | 29 +++++++++++-----------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
index 33f2f720..588ff61a 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
@@ -119,9 +119,9 @@ suspend fun doEbicsDownloadTransaction(
// The bank gave a valid XML response but EBICS had problems.
throw EbicsProtocolError(
HttpStatusCode.UnprocessableEntity,
- "Unexpected return code ${initResponse.technicalReturnCode}," +
- " for order type $orderType and transaction ID:
$transactionID," +
- " at init phase.",
+ "EBICS-technical error at init phase: " +
+ "${initResponse.technicalReturnCode}
${initResponse.reportText}," +
+ " for order type $orderType and transaction ID:
$transactionID.",
initResponse.technicalReturnCode
)
}
@@ -142,8 +142,8 @@ suspend fun doEbicsDownloadTransaction(
}
else -> {
logger.error(
- "Bank return code at init phase was:
${initResponse.bankReturnCode}, for" +
- " order type $orderType and transaction ID
$transactionID."
+ "Bank-technical error at init phase:
${initResponse.bankReturnCode}" +
+ ", for order type $orderType and transaction ID
$transactionID."
)
return EbicsDownloadBankErrorResult(initResponse.bankReturnCode)
}
@@ -153,26 +153,25 @@ suspend fun doEbicsDownloadTransaction(
val encryptionInfo = initResponse.dataEncryptionInfo
?: throw NexusError(
HttpStatusCode.BadGateway,
- "initial response did not contain encryption info. " +
+ "Initial response did not contain encryption info. " +
"Order type $orderType, transaction ID $transactionID"
)
val initOrderDataEncChunk = initResponse.orderDataEncChunk
?: throw NexusError(
HttpStatusCode.BadGateway,
- "initial response for download transaction does not " +
- "contain data transfer. Order type $orderType,
transaction ID $transactionID."
+ "Initial response for download transaction does not " +
+ "contain data transfer. Order type $orderType, " +
+ "transaction ID $transactionID."
)
-
payloadChunks.add(initOrderDataEncChunk)
val numSegments = initResponse.numSegments
?: throw NexusError(
HttpStatusCode.FailedDependency,
- "missing segment number in EBICS download init response." +
+ "Missing segment number in EBICS download init response." +
" Order type $orderType, transaction ID $transactionID"
)
-
// Transfer phase
for (x in 2 .. numSegments) {
val transferReqStr =
@@ -187,8 +186,8 @@ suspend fun doEbicsDownloadTransaction(
else -> {
throw NexusError(
HttpStatusCode.FailedDependency,
- "unexpected EBICS technical return code at transfer phase:
" +
- "${transferResponse.technicalReturnCode}." +
+ "EBICS-technical error at transfer phase: " +
+ "${transferResponse.technicalReturnCode}
${transferResponse.reportText}." +
" Order type $orderType, transaction ID
$transactionID"
)
}
@@ -198,8 +197,8 @@ suspend fun doEbicsDownloadTransaction(
// Success, nothing to do!
}
else -> {
- logger.error("Bank return code " +
- "at transfer phase was:
${transferResponse.bankReturnCode}." +
+ logger.error("Bank-technical error at transfer phase: " +
+ "${transferResponse.bankReturnCode}." +
" Order type $orderType, transaction ID
$transactionID")
return
EbicsDownloadBankErrorResult(transferResponse.bankReturnCode)
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.