[v9.2.x] Omit error from http response (#58445)

This commit is contained in:
Karl Persson
2022-11-14 09:42:45 +01:00
committed by GitHub
parent 47f8928be1
commit 0f0211f400
+2 -2
View File
@@ -28,8 +28,8 @@ func (hs *HTTPServer) SendResetPasswordEmail(c *models.ReqContext) response.Resp
usr, err := hs.userService.GetByLogin(c.Req.Context(), &userQuery)
if err != nil {
c.Logger.Info("Requested password reset for user that was not found", "user", userQuery.LoginOrEmail)
return response.Error(http.StatusOK, "Email sent", err)
c.Logger.Info("Requested password reset for user that was not found", "user", userQuery.LoginOrEmail, "error", err)
return response.Error(http.StatusOK, "Email sent", nil)
}
if usr.IsDisabled {