Unverified Commit 37ecf02e authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

catch null values

parent a21488c2
Pipeline #16654 passed with stages
in 6 minutes and 35 seconds
......@@ -87,9 +87,6 @@ class KafkaTopology(
val parsedStream = handledStream[1]
.mapValues { value -> Pair(value.first, value.second) }
.mapValues { readOnlyKey, value ->
log.warn("Key: {}", readOnlyKey)
log.warn("First Value: {}", value.first)
log.warn("Second Value as String: {}", String(value.second))
parse(readOnlyKey, value)
}
.branch(
......@@ -236,6 +233,13 @@ class KafkaTopology(
} catch (ex: KlaxonException) {
log.error(ex.localizedMessage)
Triple(null, null, Report(key, ReportStatus.failure, ex.localizedMessage))
} catch (ex: NullPointerException) {
log.error(ex.localizedMessage)
Triple(
null,
null,
Report(key, ReportStatus.failure, "There's no data to be processed: ${ex.localizedMessage}")
)
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment