Этот коммит содержится в:
@@ -101,7 +101,6 @@ issues:
|
||||
channels/app/platform/helper_test.go|\
|
||||
channels/app/platform/license.go|\
|
||||
channels/app/platform/log.go|\
|
||||
channels/app/platform/metrics.go|\
|
||||
channels/app/platform/searchengine.go|\
|
||||
channels/app/platform/service.go|\
|
||||
channels/app/platform/service_test.go|\
|
||||
|
||||
@@ -165,7 +165,9 @@ func (pm *platformMetrics) initMetricsRouter() error {
|
||||
}
|
||||
|
||||
rootHandler := func(w http.ResponseWriter, r *http.Request) {
|
||||
metricsPageTmpl.Execute(w, pm.metricsImpl != nil)
|
||||
if err := metricsPageTmpl.Execute(w, pm.metricsImpl != nil); err != nil {
|
||||
pm.logger.Error("Failed to execute template", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
pm.router.HandleFunc("/", rootHandler)
|
||||
@@ -204,7 +206,9 @@ func (pm *platformMetrics) servePluginMetricsRequest(w http.ResponseWriter, r *h
|
||||
mlog.Error(appErr.Error())
|
||||
w.WriteHeader(appErr.StatusCode)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Write([]byte(appErr.ToJSON()))
|
||||
if _, writeErr := w.Write([]byte(appErr.ToJSON())); writeErr != nil {
|
||||
mlog.Error("Failed to write error response", mlog.Err(writeErr))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -225,7 +229,9 @@ func (pm *platformMetrics) servePluginMetricsRequest(w http.ResponseWriter, r *h
|
||||
mlog.Error(appErr.Error())
|
||||
w.WriteHeader(appErr.StatusCode)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Write([]byte(appErr.ToJSON()))
|
||||
if _, writeErr := w.Write([]byte(appErr.ToJSON())); writeErr != nil {
|
||||
mlog.Error("Failed to write error response", mlog.Err(writeErr))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user