File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
src/main/kotlin/no/nav/hjelpemidler Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,36 @@ fun main() {
70
70
71
71
val rawJson: String = call.receiveText()
72
72
SensuMetrics ().meldingFraOebs()
73
- sikkerlogg.info(" Received JSON push request from OEBS: $rawJson " )
73
+ if (Configuration .application[" APP_PROFILE" ] != " prod" ) {
74
+ sikkerlogg.info(" Received JSON push request from OEBS: $rawJson " )
75
+ }
74
76
75
77
// Check for valid json request
76
78
val ordrelinje: OrdrelinjeOebs ?
77
79
try {
78
80
ordrelinje = mapper.readValue(rawJson)
79
- sikkerlogg.info(" Parsing incoming json request successful: ${mapper.writeValueAsString(ordrelinje)} " )
81
+ if (Configuration .application[" APP_PROFILE" ] != " prod" ) {
82
+ sikkerlogg.info(
83
+ " Parsing incoming json request successful: ${
84
+ mapper.writeValueAsString(
85
+ ordrelinje
86
+ )
87
+ } "
88
+ )
89
+ }
80
90
SensuMetrics ().oebsParsingOk()
81
91
} catch (e: Exception ) {
82
92
// Deal with invalid json in request
83
93
sikkerlogg.info(" Parsing incoming json request failed with exception (responding 4xx): $e " )
94
+ if (Configuration .application[" APP_PROFILE" ] != " prod" ) {
95
+ sikkerlogg.info(
96
+ " JSON in failed parsing: ${
97
+ mapper.writeValueAsString(
98
+ rawJson
99
+ )
100
+ } "
101
+ )
102
+ }
84
103
SensuMetrics ().oebsParsingFeilet()
85
104
call.respond(HttpStatusCode .BadRequest , " bad request: json not valid" )
86
105
return @post
You can’t perform that action at this time.
0 commit comments