File tree 2 files changed +5
-1
lines changed
src/main/kotlin/no/nav/pensjon/kalkulator
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import no.nav.pensjon.kalkulator.tech.web.EgressException
18
18
import org.springframework.http.HttpStatus
19
19
import org.springframework.web.bind.annotation.*
20
20
import org.springframework.web.server.ResponseStatusException
21
-
22
21
@RestController
23
22
@RequestMapping(" api" )
24
23
class PersonController (
@@ -53,6 +52,7 @@ class PersonController(
53
52
fun personV2 (): PersonV2 {
54
53
traceAid.begin()
55
54
log.debug { " Request for personinformasjon V2" }
55
+ throw ResponseStatusException (HttpStatus .SERVICE_UNAVAILABLE , " Midlertidig utilgjengelig" )
56
56
57
57
return try {
58
58
PersonMapperV2 .dtoV2(timed(service::getPerson, " person" ))
@@ -91,6 +91,7 @@ class PersonController(
91
91
fun personV4 (): PersonResultV4 {
92
92
traceAid.begin()
93
93
log.debug { " Request for personinformasjon V4" }
94
+ throw ResponseStatusException (HttpStatus .SERVICE_UNAVAILABLE , " Midlertidig utilgjengelig" )
94
95
95
96
return try {
96
97
PersonMapperV4 .dtoV4(timed(service::getPerson, " person" ))
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import no.nav.pensjon.kalkulator.tech.web.EgressException
25
25
import org.springframework.http.HttpStatus
26
26
import org.springframework.http.ResponseEntity
27
27
import org.springframework.web.bind.annotation.*
28
+ import org.springframework.web.server.ResponseStatusException
28
29
29
30
@RestController
30
31
@RequestMapping(" api" )
@@ -60,6 +61,7 @@ class SimuleringController(
60
61
fun simulerAlderspensjonV8 (@RequestBody spec : PersonligSimuleringSpecV8 ): PersonligSimuleringResultV8 {
61
62
traceAid.begin()
62
63
log.debug { " Request for V8 simulering: $spec " }
64
+ throw ResponseStatusException (HttpStatus .SERVICE_UNAVAILABLE , " Midlertidig utilgjengelig" )
63
65
64
66
return try {
65
67
if (feature.isEnabled(" utvidet-simuleringsresultat" ))
@@ -119,6 +121,7 @@ class SimuleringController(
119
121
fun simulerAnonymAlderspensjonV1 (@RequestBody spec : AnonymSimuleringSpecV1 ): ResponseEntity <AnonymSimuleringResultV1 > {
120
122
traceAid.begin()
121
123
log.debug { " Request for anonym simulering V1: $spec " }
124
+ throw ResponseStatusException (HttpStatus .SERVICE_UNAVAILABLE , " Midlertidig utilgjengelig" )
122
125
123
126
return try {
124
127
ResponseEntity .ok(
You can’t perform that action at this time.
0 commit comments