diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go index bb100a7aef..abf54aba29 100644 --- a/routers/web/org/setting.go +++ b/routers/web/org/setting.go @@ -246,9 +246,7 @@ func SettingsChangeVisibilityPost(ctx *context.Context) { if err := org_service.ChangeOrganizationVisibility(ctx, ctx.Org.Organization, visibility); err != nil { log.Error("ChangeOrganizationVisibility: %v", err) - ctx.JSON(http.StatusInternalServerError, map[string]any{ - "err": http.StatusText(http.StatusInternalServerError), - }) + ctx.JSONError(ctx.Tr("error.occurred")) return }