Skip to content

Commit

Permalink
Add json marshal error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
adilyse authored and Rebecca Zanzig committed Jul 9, 2019
1 parent 7cce28e commit bccf2e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connect-inject/container_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ func (h *Handler) containerInit(pod *corev1.Pod) (corev1.Container, error) {
tags := strings.Split(raw, ",")

// Create json array from the annotations
jsonTags, _ := json.Marshal(tags)
jsonTags, err := json.Marshal(tags)
if err != nil {
h.Log.Error("Error json marshaling tags", "Error", err, "Tags", tags)
}

data.Tags = string(jsonTags)
}
Expand Down

0 comments on commit bccf2e2

Please sign in to comment.