Add common error user not public
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-31 09:08:03 +08:00
parent 304bf0f50d
commit 83cec316bc
2 changed files with 3 additions and 2 deletions

View File

@@ -9,3 +9,4 @@ common:
database: "00006" database: "00006"
missing_user_id: "00007" missing_user_id: "00007"
user_not_found: "00008" user_not_found: "00008"
user_not_public: "00009"

View File

@@ -71,13 +71,13 @@ func (self *UserServiceImpl) GetUserInfo(payload *UserInfoPayload) (result *User
SetService(exception.ServiceUser). SetService(exception.ServiceUser).
SetEndpoint(exception.EndpointUserServiceInfo). SetEndpoint(exception.EndpointUserServiceInfo).
SetType(exception.TypeCommon). SetType(exception.TypeCommon).
SetOriginal(exception.CommonErrorUserNotFound). SetOriginal(exception.CommonErrorUserNotPublic).
SetError(err). SetError(err).
Throw(payload.Context) Throw(payload.Context)
result = &UserInfoResult{ result = &UserInfoResult{
Common: shared.CommonResult{ Common: shared.CommonResult{
HttpCode: 404, HttpCode: 403,
Exception: exception, Exception: exception,
}, },
Data: nil, Data: nil,