Skip to content
Snippets Groups Projects
Commit f2974e4e authored by Daniel Naude's avatar Daniel Naude
Browse files

Fix isBase64Encoded type assertion in ServeHTTPFunctions if value is nil

parent 59c70314
Branches
Tags v1.198.0
No related merge requests found
......@@ -79,7 +79,7 @@ func ServeHTTPFunctions(ctx context.Context, lambdaHandler lambda.Handler, w htt
w.WriteHeader(int(response["statusCode"].(float64)))
if response["isBase64Encoded"].(bool) {
if isBase64Encoded, ok := response["isBase64Encoded"]; ok && isBase64Encoded.(bool) {
decoded, err := base64.StdEncoding.DecodeString(response["body"].(string))
if err != nil {
panic(err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment