[v8.5.x] Omit error from http response (#58453)

This commit is contained in:
Karl Persson
2022-11-14 09:42:58 +01:00
committed by GitHub
parent d25246ca15
commit 4cfb76b4bc
+2 -2
View File
@@ -28,8 +28,8 @@ func (hs *HTTPServer) SendResetPasswordEmail(c *models.ReqContext) response.Resp
userQuery := models.GetUserByLoginQuery{LoginOrEmail: form.UserOrEmail}
if err := hs.SQLStore.GetUserByLogin(c.Req.Context(), &userQuery); err != nil {
c.Logger.Info("Requested password reset for user that was not found", "user", userQuery.LoginOrEmail)
return response.Error(200, "Email sent", err)
c.Logger.Info("Requested password reset for user that was not found", "user", userQuery.LoginOrEmail, "error", err)
return response.Error(200, "Email sent", nil)
}
emailCmd := models.SendResetPasswordEmailCommand{User: userQuery.Result}