Skip to content

Commit

Permalink
chore: return not found if oppgave is null
Browse files Browse the repository at this point in the history
  • Loading branch information
nuranes committed Dec 4, 2024
1 parent 0b4d932 commit 902f255
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.sykdig.digitalisering.papirsykmelding.api

import net.logstash.logback.argument.StructuredArguments
import no.nav.sykdig.applog
import no.nav.sykdig.digitalisering.helsenett.SykmelderService
import no.nav.sykdig.digitalisering.papirsykmelding.NasjonalOppgaveService
Expand Down Expand Up @@ -66,8 +67,13 @@ class NasjonalOppgaveController(
if (papirManuellOppgave != null) {
securelog.info("lagrer nasjonalOppgave i db $papirManuellOppgave")
nasjonalOppgaveService.lagreOppgave(papirManuellOppgave)
return oppgave
}
return oppgave
log.info(
"Fant ingen uløste manuelle oppgaver med oppgaveid {}",
StructuredArguments.keyValue("oppgaveId", oppgaveId)
)
return ResponseEntity.notFound().build()
}

@GetMapping("/pasient")
Expand Down

0 comments on commit 902f255

Please sign in to comment.