check if source is nil, return UNKNOWN in that case

This commit is contained in:
aishwarya-raimule
2023-01-17 12:33:47 +05:30
parent 73b4455958
commit 5abdd8289f

View File

@@ -104,7 +104,7 @@ func ClickstreamJsonEventHandler(request RequestObject, topic string) {
func getSource(event map[string]interface{}) string {
if event["source"] == nil {
event["source"] = "UNKNOWN"
return "UNKNOWN"
}
return event["source"].(string)
}