From 6dac5a460242b874db5864fc6b29a0c30f847f29 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 8 Jul 2025 19:00:23 -0700 Subject: [PATCH] follow wxiaoguang's suggestion --- routers/web/org/setting.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 }