Skip to content

Commit

Permalink
refactor: added cpaId to the logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanskodje committed Jul 15, 2024
1 parent 09c97f1 commit 4d1447b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpa-repo/src/main/kotlin/no/nav/emottak/cpa/Routes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ fun Route.validateCpa(cpaRepository: CPARepository) = post("/cpa/validate/{$CONT
val validateRequest = call.receive(ValidationRequest::class)
try {
log.info(validateRequest.marker(), "Validerer ebms mot CPA")
val cpa = cpaRepository.findCpa(validateRequest.cpaId) ?: throw NotFoundException("Fant ikke CPA")
cpa.validate(validateRequest) // Delivery Filure
val partyInfo = cpa.getPartyInfoByTypeAndID(validateRequest.addressing.from.partyId) // delivery Failure
val cpa = cpaRepository.findCpa(validateRequest.cpaId) ?: throw NotFoundException("Fant ikke CPA (${validateRequest.cpaId})")
cpa.validate(validateRequest) // Delivery Failure
val partyInfo = cpa.getPartyInfoByTypeAndID(validateRequest.addressing.from.partyId) // Delivery Failure
val encryptionCertificate = partyInfo.getCertificateForEncryption() // Security Failure
val signingCertificate = partyInfo.getCertificateForSignatureValidation(
validateRequest.addressing.from.role,
Expand Down

0 comments on commit 4d1447b

Please sign in to comment.