commit 16a0d51d1139659a365b2d123e54886a738934fb
parent 38cb05b259002d5eac494cd175c6f02a2d7effbf
Author: MS <ms@taler.net>
Date: Sun, 15 Jan 2023 19:12:46 +0100
Logging policy: not throwing stacktraces by default.
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -168,7 +168,7 @@ val nexusApp: Application.() -> Unit = {
}
install(StatusPages) {
exception<NexusError> { call, cause ->
- logger.error("Caught exception while handling '${call.request.uri} (${cause.reason})")
+ logger.error("Caught exception while handling '${call.request.uri} (${cause.message})")
call.respond(
status = cause.statusCode,
message = ErrorResponse(
@@ -179,7 +179,7 @@ val nexusApp: Application.() -> Unit = {
)
}
exception<JsonMappingException> { call, cause ->
- logger.error("Exception while handling '${call.request.uri}'", cause)
+ logger.error("Exception while handling '${call.request.uri}'", cause.message)
call.respond(
HttpStatusCode.BadRequest,
message = ErrorResponse(
@@ -190,7 +190,7 @@ val nexusApp: Application.() -> Unit = {
)
}
exception<UtilError> { call, cause ->
- logger.error("Exception while handling '${call.request.uri}'", cause)
+ logger.error("Exception while handling '${call.request.uri}'", cause.message)
call.respond(
cause.statusCode,
message = ErrorResponse(
@@ -201,7 +201,7 @@ val nexusApp: Application.() -> Unit = {
)
}
exception<EbicsProtocolError> { call, cause ->
- logger.error("Caught exception while handling '${call.request.uri}' (${cause.reason})")
+ logger.error("Caught exception while handling '${call.request.uri}' (${cause.message})")
call.respond(
cause.httpStatusCode,
message = ErrorResponse(
@@ -223,7 +223,7 @@ val nexusApp: Application.() -> Unit = {
)
}
exception<Exception> { call, cause ->
- logger.error("Uncaught exception while handling '${call.request.uri}'")
+ logger.error("Uncaught exception while handling '${call.request.uri}'", cause.message)
cause.printStackTrace()
call.respond(
HttpStatusCode.InternalServerError,