Skip to content

Commit

Permalink
Logger opprettelse og retur av message error
Browse files Browse the repository at this point in the history
  • Loading branch information
thburnett committed Nov 27, 2024
1 parent e9980c8 commit 5af9ee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ebms-provider/src/main/kotlin/no/nav/emottak/ebms/Routes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ fun Route.postEbmsSync(
signingCertificate?.let { signatureDetails ->
it.signer(signatureDetails)
}
log.info(ebmsMessage.marker(), "Created MessageError response")
call.respondEbmsDokument(it)
return@post
}
Expand Down Expand Up @@ -282,7 +283,7 @@ fun Route.postEbmsAsync(validator: DokumentValidator, processingService: Process
processingService.processAsync(ebmsMessage, it.payloadProcessing)
}
if (ebmsMessage !is PayloadMessage) {
log.info(ebMSDocument.messageHeader().marker(), "Successfuly processed Signal Message")
log.info(ebMSDocument.messageHeader().marker(), "Successfully processed Signal Message")
call.respondText("Processed")
return@post
}
Expand All @@ -293,6 +294,7 @@ fun Route.postEbmsAsync(validator: DokumentValidator, processingService: Process
}
} catch (ex: EbmsException) {
ebmsMessage.createFail(ex.feil).toEbmsDokument().also {
log.info(ebmsMessage.marker(), "Created MessageError response")
call.respondEbmsDokument(it)
return@post
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ data class EbmsFail(

override fun toEbmsDokument(): EbMSDocument {
val header = this.createMessageHeader(this.addressing.copy(action = EbXMLConstants.MESSAGE_ERROR_ACTION, service = EbXMLConstants.EBMS_SERVICE_URI))
// log.warn(this.marker(), "Oppretter ErrorList")
return ObjectFactory().createEnvelope()!!.also {
it.header = header.also {
it.any.add(this.feil.asErrorList())
Expand Down

0 comments on commit 5af9ee1

Please sign in to comment.