mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Find-and-replace 'err' logs to 'error' to match log search conventions (#57309)
This commit is contained in:
@@ -55,7 +55,7 @@ func (srv ConfigSrv) RouteGetNGalertConfig(c *models.ReqContext) response.Respon
|
||||
}
|
||||
|
||||
msg := "failed to fetch admin configuration from the database"
|
||||
srv.log.Error(msg, "err", err)
|
||||
srv.log.Error(msg, "error", err)
|
||||
return ErrResp(http.StatusInternalServerError, err, msg)
|
||||
}
|
||||
|
||||
@@ -94,14 +94,14 @@ func (srv ConfigSrv) RoutePostNGalertConfig(c *models.ReqContext, body apimodels
|
||||
|
||||
if err := cfg.Validate(); err != nil {
|
||||
msg := "failed to validate admin configuration"
|
||||
srv.log.Error(msg, "err", err)
|
||||
srv.log.Error(msg, "error", err)
|
||||
return ErrResp(http.StatusBadRequest, err, msg)
|
||||
}
|
||||
|
||||
cmd := store.UpdateAdminConfigurationCmd{AdminConfiguration: cfg}
|
||||
if err := srv.store.UpdateAdminConfiguration(cmd); err != nil {
|
||||
msg := "failed to save the admin configuration to the database"
|
||||
srv.log.Error(msg, "err", err)
|
||||
srv.log.Error(msg, "error", err)
|
||||
return ErrResp(http.StatusBadRequest, err, msg)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (srv ConfigSrv) RouteDeleteNGalertConfig(c *models.ReqContext) response.Res
|
||||
|
||||
err := srv.store.DeleteAdminConfiguration(c.OrgID)
|
||||
if err != nil {
|
||||
srv.log.Error("unable to delete configuration", "err", err)
|
||||
srv.log.Error("unable to delete configuration", "error", err)
|
||||
return ErrResp(http.StatusInternalServerError, err, "")
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ func (srv ConfigSrv) RouteGetAlertingStatus(c *models.ReqContext) response.Respo
|
||||
cfg, err := srv.store.GetAdminConfiguration(c.OrgID)
|
||||
if err != nil && !errors.Is(err, store.ErrNoAdminConfiguration) {
|
||||
msg := "failed to fetch configuration from the database"
|
||||
srv.log.Error(msg, "err", err)
|
||||
srv.log.Error(msg, "error", err)
|
||||
return ErrResp(http.StatusInternalServerError, err, msg)
|
||||
}
|
||||
if cfg != nil {
|
||||
|
||||
Reference in New Issue
Block a user