diff --git a/routers/web/user/setting/notifications.go b/routers/web/user/setting/notifications.go index 7aa67a5ce4..cd62d2dac3 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.NotFound(errors.New("NotifyMail not enabled")) + ctx.NotFound(nil) return }