From 27f96e85214cf0d4ab526ebce801a6c9d9fe6fa2 Mon Sep 17 00:00:00 2001 From: AudunSorheim Date: Wed, 10 Apr 2024 14:43:27 +0200 Subject: [PATCH] wip --- src/main/kotlin/no/nav/syfo/db/UtbetalingSpleisDAO.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/no/nav/syfo/db/UtbetalingSpleisDAO.kt b/src/main/kotlin/no/nav/syfo/db/UtbetalingSpleisDAO.kt index 25194d0d0..afa5a3b26 100644 --- a/src/main/kotlin/no/nav/syfo/db/UtbetalingSpleisDAO.kt +++ b/src/main/kotlin/no/nav/syfo/db/UtbetalingSpleisDAO.kt @@ -2,8 +2,8 @@ package no.nav.syfo.db import no.nav.syfo.domain.PersonIdent import no.nav.syfo.kafka.consumers.utbetaling.domain.UtbetalingSpleis -import org.postgresql.util.PSQLException import java.sql.Date +import java.sql.SQLIntegrityConstraintViolationException import java.sql.Timestamp import java.time.LocalDateTime import java.util.* @@ -47,7 +47,7 @@ fun DatabaseInterface.storeSpleisUtbetaling(utbetaling: UtbetalingSpleis) { it.executeUpdate() } connection.commit() - } catch (e: PSQLException) { + } catch (e: SQLIntegrityConstraintViolationException) { log.debug("Ignoring duplicate message from Spleis with utbetalingID " + utbetaling.utbetalingId) } }