check if source is nil, return UNKNOWN in that case
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user