diff --git a/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/HentGrunnlagFeiltype.kt b/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/HentGrunnlagFeiltype.kt new file mode 100644 index 00000000..d12bd20b --- /dev/null +++ b/bidrag-domene/src/main/kotlin/no/nav/bidrag/domene/enums/grunnlag/HentGrunnlagFeiltype.kt @@ -0,0 +1,9 @@ +package no.nav.bidrag.domene.enums.grunnlag + +enum class HentGrunnlagFeiltype { + TJENESTE_UTILGJENGELIG, // 503 + FEIL_I_TJENESTE, // 5xx + FEIL_I_REQUEST, // 4xx + PERSON_ID_UGYLDIG, + UKJENT_FEIL, +} diff --git a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/FeilrapporteringDto.kt b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/FeilrapporteringDto.kt new file mode 100644 index 00000000..2dd38d90 --- /dev/null +++ b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/FeilrapporteringDto.kt @@ -0,0 +1,21 @@ +package no.nav.bidrag.transport.behandling.grunnlag.response + +import io.swagger.v3.oas.annotations.media.Schema +import no.nav.bidrag.domene.enums.grunnlag.GrunnlagRequestType +import no.nav.bidrag.domene.enums.grunnlag.HentGrunnlagFeiltype +import java.time.LocalDate + +data class FeilrapporteringDto( + @Schema(description = "Type grunnlag") + val grunnlagstype: GrunnlagRequestType, + @Schema(description = "Id til personen grunnlaget er forsøkt hentet for") + val personId: String?, + @Schema(description = "Periode fra-dato") + val periodeFra: LocalDate?, + @Schema(description = "Periode til-dato") + val periodeTil: LocalDate?, + @Schema(description = "Type feil") + val feiltype: HentGrunnlagFeiltype, + @Schema(description = "Feilmelding") + val feilmelding: String, +) diff --git a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/HentGrunnlagDto.kt b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/HentGrunnlagDto.kt index 905fecd8..faf3f98e 100644 --- a/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/HentGrunnlagDto.kt +++ b/bidrag-transport/src/main/kotlin/no/nav/bidrag/transport/behandling/grunnlag/response/HentGrunnlagDto.kt @@ -27,6 +27,8 @@ data class HentGrunnlagDto( val barnetilsynListe: List, @Schema(description = "Periodisert liste over arbeidsforhold") val arbeidsforholdListe: List, + @Schema(description = "Liste over evt. feil rapportert under henting av grunnlag") + val feilrapporteringListe: List, @Schema(description = "Hentet tidspunkt") val hentetTidspunkt: LocalDateTime, )