[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Avoid stack-traces on managed exceptio
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Avoid stack-traces on managed exceptions. |
Date: |
Thu, 14 Jan 2021 10:11:30 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 8e2c62b Avoid stack-traces on managed exceptions.
8e2c62b is described below
commit 8e2c62b903e5d33b7a0cc4375c6ed262d1ecf0e0
Author: MS <ms@taler.net>
AuthorDate: Thu Jan 14 10:11:19 2021 +0100
Avoid stack-traces on managed exceptions.
---
integration-tests/tests.py | 7 +++----
nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 9 +++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index 4942dc9..2061156 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -127,10 +127,9 @@ def teardown_function():
def test_env(make_crdt_payment, make_taler_facade):
print("Nexus and Sandbox are up and running!\n")
- print(f"Nexus URL: {NEXUS_URL}")
- print(f"Sandbox URL: {SANDBOX_URL}")
- print(f"Username/password active at Nexus:
{PERSONA.nexus.username}/{PERSONA.nexus.password}")
- print(f"Bank connection name: {PERSONA.nexus.bank_connection}")
+ print("Env-setter for the CLI:")
+ print(f"\texport NEXUS_BASE_URL={NEXUS_URL}
NEXUS_USERNAME={PERSONA.nexus.username}
NEXUS_PASSWORD={PERSONA.nexus.password}")
+ print(f"\nBank connection name: {PERSONA.nexus.bank_connection}")
print(f"Imported bank account label: {PERSONA.nexus.bank_label}")
try:
input("\npress enter to stop LibEuFin test environment ...")
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
index 2c0a6a3..c07f32e 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -46,6 +46,7 @@ import io.ktor.response.respondText
import io.ktor.routing.*
import io.ktor.server.engine.embeddedServer
import io.ktor.server.netty.Netty
+import io.ktor.util.error
import io.ktor.utils.io.ByteReadChannel
import io.ktor.utils.io.jvm.javaio.toByteReadChannel
import io.ktor.utils.io.jvm.javaio.toInputStream
@@ -252,7 +253,7 @@ fun serverMain(dbName: String, host: String, port: Int) {
}
install(StatusPages) {
exception<NexusError> { cause ->
- logger.error("Exception while handling '${call.request.uri}'",
cause)
+ logger.error("Caught exception while handling
'${call.request.uri} (${cause.reason})")
call.respond(
status = cause.statusCode,
message = NexusErrorJson(
@@ -264,7 +265,7 @@ fun serverMain(dbName: String, host: String, port: Int) {
)
}
exception<EbicsProtocolError> { cause ->
- logger.error("Exception while handling '${call.request.uri}'",
cause)
+ logger.error("Caught exception while handling
'${call.request.uri}' (${cause.reason})")
call.respond(
cause.httpStatusCode,
NexusErrorJson(
@@ -276,8 +277,8 @@ fun serverMain(dbName: String, host: String, port: Int) {
)
}
exception<Exception> { cause ->
- logger.error("Uncaught exception while handling
'${call.request.uri}'", cause)
- logger.error(cause.toString())
+ logger.error("Uncaught exception while handling
'${call.request.uri}'")
+ logger.error(cause.stackTrace.toString())
call.respond(
NexusErrorJson(
error = NexusErrorDetailJson(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Avoid stack-traces on managed exceptions.,
gnunet <=