From 1b189c1eab633a1b339838df7facfe36eaf80872 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Thu, 6 Apr 2017 17:30:53 -0500 Subject: [PATCH] Update cell dashboard error messags to be descriptive --- server/dashboards.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/dashboards.go b/server/dashboards.go index 0a0a71eac..73705a645 100644 --- a/server/dashboards.go +++ b/server/dashboards.go @@ -365,7 +365,7 @@ func (s *Service) NewDashboardCell(w http.ResponseWriter, r *http.Request) { dash.Cells = append(dash.Cells, cell) if err := s.DashboardsStore.Update(ctx, dash); err != nil { - msg := fmt.Sprintf("Error updating dashboard ID %d: %v", id, err) + msg := fmt.Sprintf("Error adding cell %s to dashboard %d: %v", cid, id, err) Error(w, http.StatusInternalServerError, msg, s.Logger) return } @@ -435,7 +435,7 @@ func (s *Service) RemoveDashboardCell(w http.ResponseWriter, r *http.Request) { dash.Cells = append(dash.Cells[:cellid], dash.Cells[cellid+1:]...) if err := s.DashboardsStore.Update(ctx, dash); err != nil { - msg := fmt.Sprintf("Error updating dashboard ID %d: %v", id, err) + msg := fmt.Sprintf("Error removing cell %s from dashboard %d: %v", cid, id, err) Error(w, http.StatusInternalServerError, msg, s.Logger) return } @@ -484,7 +484,7 @@ func (s *Service) ReplaceDashboardCell(w http.ResponseWriter, r *http.Request) { dash.Cells[cellid] = cell if err := s.DashboardsStore.Update(ctx, dash); err != nil { - msg := fmt.Sprintf("Error updating dashboard ID %d: %v", id, err) + msg := fmt.Sprintf("Error updating cell %s in dashboard %d: %v", cid, id, err) Error(w, http.StatusInternalServerError, msg, s.Logger) return }