diff --git a/cmd/jiralert/content.go b/cmd/jiralert/content.go index 486ea76..cffa61f 100644 --- a/cmd/jiralert/content.go +++ b/cmd/jiralert/content.go @@ -75,7 +75,7 @@ var ( allTemplates = template.Must(template.New("").Parse(templates)) homeTemplate = pageTemplate("home") configTemplate = pageTemplate("config") - errorTemplate = pageTemplate("error") + // errorTemplate = pageTemplate("error") ) func pageTemplate(name string) *template.Template { @@ -104,10 +104,10 @@ func ConfigHandlerFunc(config *jiralert.Config) func(http.ResponseWriter, *http. // HandleError is an error handler that other handlers defer to in case of error. It is important to not have written // anything to w before calling HandleError(), or the 500 status code won't be set (and the content might be mixed up). -func HandleError(err error, metricsPath string, w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusInternalServerError) - errorTemplate.Execute(w, &tdata{ - DocsUrl: docsUrl, - Err: err, - }) -} +//func HandleError(err error, metricsPath string, w http.ResponseWriter, r *http.Request) { +// w.WriteHeader(http.StatusInternalServerError) +// errorTemplate.Execute(w, &tdata{ +// DocsUrl: docsUrl, +// Err: err, +// }) +//} diff --git a/cmd/jiralert/main.go b/cmd/jiralert/main.go index 7501a10..825428c 100644 --- a/cmd/jiralert/main.go +++ b/cmd/jiralert/main.go @@ -67,7 +67,7 @@ func main() { conf := config.ReceiverByName(data.Receiver) if conf == nil { - errorHandler(w, http.StatusNotFound, fmt.Errorf("Receiver missing: %s", data.Receiver), unknownReceiver, &data) + errorHandler(w, http.StatusNotFound, fmt.Errorf("receiver missing: %s", data.Receiver), unknownReceiver, &data) return } log.V(1).Infof("Matched receiver: %q", conf.Name)