Skip to content

Commit 96c9a99

Browse files
committed
really fixed panic due to nil err
1 parent efbef00 commit 96c9a99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internals/proxy/middlewares/template.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ func TemplateBody(data map[string]any, VARIABLES map[string]any) (map[string]any
120120
jsonStr = re.ReplaceAllString(jsonStr, "{{.$1}}")
121121

122122
normalizedData, err := jsonutils.GetJsonSafe[map[string]any](jsonStr)
123-
124-
log.Dev("Error removing @ and encoding: ", err.Error())
125123

126124
if err == nil {
127125
data = normalizedData
126+
} else {
127+
log.Dev(err.Error())
128128
}
129129
}
130130

0 commit comments

Comments
 (0)