From f2c6a6b15682be5483fc9b771c18f32d77216985 Mon Sep 17 00:00:00 2001 From: ramziabuqassim Date: Tue, 18 Jun 2024 13:27:59 +0200 Subject: [PATCH] =?UTF-8?q?filtrerer=20false-positive=20distribueringer=20?= =?UTF-8?q?som=20er=20for=20tidlig=20til=20=C3=A5=20distribuere=20fra=20lo?= =?UTF-8?q?ggen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Journalf\303\270ringOgDistribueringsResultat.kt" | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git "a/service/src/main/kotlin/no/nav/su/se/bakover/service/journalf\303\270ring/Journalf\303\270ringOgDistribueringsResultat.kt" "b/service/src/main/kotlin/no/nav/su/se/bakover/service/journalf\303\270ring/Journalf\303\270ringOgDistribueringsResultat.kt" index f5413148a9..9cf292a42d 100644 --- "a/service/src/main/kotlin/no/nav/su/se/bakover/service/journalf\303\270ring/Journalf\303\270ringOgDistribueringsResultat.kt" +++ "b/service/src/main/kotlin/no/nav/su/se/bakover/service/journalf\303\270ring/Journalf\303\270ringOgDistribueringsResultat.kt" @@ -128,5 +128,11 @@ fun List.logResultat(logContext: String, fun List.ok(): List = this.filterIsInstance().map { it.id } -fun List.feil() = - this.filterIsInstance().map { it.id } +/** + * denne brukes kun i context for logging + * Vi er kun interessert i faktiske feil, ikke at vi prøver for tidlig + */ +private fun List.feil() = + this.filterIsInstance().filterNot { + it.originalFeil is JournalføringOgDistribueringsFeil.Distribuering && it.originalFeil.originalFeil is KunneIkkeBestilleBrevForDokument.ForTidligÅPrøvePåNytt + }.map { it.id }