From b65cd42d8686a99ee7e00b6c4ee7af6b63b0f31b Mon Sep 17 00:00:00 2001 From: liugq Date: Sun, 25 Jun 2023 10:26:19 +0800 Subject: [PATCH] throw resolve map_label error --- plugin/api/insight/map_label.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/api/insight/map_label.go b/plugin/api/insight/map_label.go index 0209a30c..15b84208 100644 --- a/plugin/api/insight/map_label.go +++ b/plugin/api/insight/map_label.go @@ -79,7 +79,8 @@ func (h *InsightAPI) renderMapLabelTemplate(w http.ResponseWriter, req *http.Req label, err := common2.ExecuteTemplate(tpl, ctx.Value) if err != nil { log.Error(err) - continue + h.WriteError(w, err.Error(), http.StatusInternalServerError) + return } resultLabels[ctx.Key] = string(label) }