dashboards: better error handling

This commit is contained in:
Leonard Gram
2019-03-19 13:57:30 +01:00
parent 89d4db8eb6
commit d593ffe3c1
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ func (hs *HTTPServer) PostDashboard(c *m.ReqContext, cmd m.SaveDashboardCommand)
aclService := dashboards.NewAclService()
err := aclService.MakeUserAdmin(cmd.OrgId, cmd.UserId, dashboard.Id)
if err != nil {
hs.log.Error("Could not make user admin", "error", err)
hs.log.Error("Could not make user admin", "dashboard", cmd.Result.Title, "user", c.SignedInUser.UserId, "error", err)
return Error(500, "Failed to make user admin of dashboard", err)
}
}