commit b45cb5dac22728a9b8db17e3745aed9ab4f304a7
parent 121235aa5b16348a6f016bbce9ef194fd6910563
Author: MS <ms@taler.net>
Date: Sat, 7 Jan 2023 13:15:06 +0100
Fix accidental import.
Diffstat:
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/nexus/build.gradle b/nexus/build.gradle
@@ -49,7 +49,6 @@ dependencies {
// LibEuFin util library
implementation project(":util")
- implementation project(":sandbox") // for testing
// Logging
implementation 'ch.qos.logback:logback-classic:1.2.5'
@@ -97,6 +96,7 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
testImplementation 'org.jetbrains.kotlin:kotlin-test:1.5.21'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.5.21'
+ testImplementation project(":sandbox")
}
test {
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -52,8 +52,6 @@ import tech.libeufin.nexus.*
import tech.libeufin.nexus.bankaccount.*
import tech.libeufin.nexus.ebics.*
import tech.libeufin.nexus.iso20022.CamtBankAccountEntry
-import tech.libeufin.sandbox.SandboxErrorDetailJson
-import tech.libeufin.sandbox.SandboxErrorJson
import tech.libeufin.util.*
import java.net.BindException
import java.net.URLEncoder
@@ -214,14 +212,13 @@ val nexusApp: Application.() -> Unit = {
)
}
exception<BadRequestException> { call, cause ->
- tech.libeufin.sandbox.logger.error("Exception while handling '${call.request.uri}', ${cause.message}")
+ logger.error("Exception while handling '${call.request.uri}', ${cause.message}")
call.respond(
HttpStatusCode.BadRequest,
- SandboxErrorJson(
- error = SandboxErrorDetailJson(
- type = "util-error",
- description = cause.message ?: "Bad request but did not find exact cause."
- )
+ ErrorResponse(
+ code = TalerErrorCode.TALER_EC_LIBEUFIN_NEXUS_GENERIC_ERROR.code,
+ detail = cause.message ?: "Bad request but did not find exact cause.",
+ hint = "Malformed request or unacceptable values"
)
)
}