From dffa57559112eaebc1eb777dfe34d415fc8a1c3a Mon Sep 17 00:00:00 2001 From: Jake Champlin Date: Fri, 19 May 2017 14:36:39 -0400 Subject: [PATCH] add docstring on ignored error --- builtin/providers/aws/structure.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/providers/aws/structure.go b/builtin/providers/aws/structure.go index e265457388..262dccfdc7 100644 --- a/builtin/providers/aws/structure.go +++ b/builtin/providers/aws/structure.go @@ -1886,10 +1886,9 @@ func normalizeJsonString(jsonString interface{}) (string, error) { return s, err } - bytes, err := json.Marshal(j) - if err != nil { - return s, err - } + // The error is intentionally ignored here to allow empty policies to passthrough validation. + // This covers any interpolated values + bytes, _ := json.Marshal(j) return string(bytes[:]), nil }