diff --git a/routers/web/user/setting/notifications.go b/routers/web/user/setting/notifications.go index 9e10568fa4..ecb7b80620 100644 --- a/routers/web/user/setting/notifications.go +++ b/routers/web/user/setting/notifications.go @@ -35,7 +35,7 @@ func Notifications(ctx *context.Context) { // SetGlobalEmailNotificationPreference set user's email notification preference func SetGlobalEmailNotificationPreference(ctx *context.Context) { if !setting.Service.EnableNotifyMail { - ctx.HTTPError(http.StatusNotFound) + ctx.NotFound(errors.New("NotifyMail not enabled")) return }