[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 01/02: Logging.
From: |
gnunet |
Subject: |
[libeufin] 01/02: Logging. |
Date: |
Fri, 20 Jan 2023 21:07:37 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit f8b79329c9f2831af55b1e2f49c4ea3c779565d8
Author: MS <ms@taler.net>
AuthorDate: Fri Jan 20 21:05:37 2023 +0100
Logging.
Prefer verbosity for failed TAN commands.
---
.../main/kotlin/tech/libeufin/sandbox/CircuitApi.kt | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
index 78870cf6..0f64efa6 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
@@ -390,10 +390,15 @@ fun circuitApi(circuitRoute: Route) {
message = op.tan
)
} catch (e: Exception) {
- throw internalServerError("E-mail TAN command threw
exception: ${e.message}")
+ throw internalServerError(
+ "Sending the e-mail TAN failed for ${customer.email}."
+
+ " The command threw this exception:
${e.message}"
+ )
}
if (!isSuccessful)
- throw internalServerError("E-mail TAN command failed.")
+ throw internalServerError(
+ "E-mail TAN command failed for ${customer.email}."
+ )
}
SupportedTanChannels.SMS.name -> {
val isSuccessful = try {
@@ -411,10 +416,14 @@ fun circuitApi(circuitRoute: Route) {
)
} catch (e: Exception) {
- throw internalServerError("SMS TAN command threw
exception: ${e.message}")
+ throw internalServerError(
+ "Sending the SMS TAN failed for ${customer.phone}." +
+ " The command threw this exception:
${e.message}"
+ )
}
if (!isSuccessful)
- throw internalServerError("SMS TAN command failed.")
+ throw internalServerError(
+ "SMS TAN command failed for ${customer.phone}.")
}
SupportedTanChannels.FILE.name -> {
try {
@@ -425,7 +434,7 @@ fun circuitApi(circuitRoute: Route) {
}
}
else ->
- throw internalServerError("The bank didn't catch a unsupported
TAN channel: $tanChannel.")
+ throw internalServerError("The bank tried an unsupported TAN
channel: $tanChannel.")
}
call.respond(HttpStatusCode.Accepted, object {val uuid = op.uuid})
return@post
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.